当前位置: 首页>>代码示例>>C++>>正文


C++ CAViewController::removeViewFromSuperview方法代码示例

本文整理汇总了C++中CAViewController::removeViewFromSuperview方法的典型用法代码示例。如果您正苦于以下问题:C++ CAViewController::removeViewFromSuperview方法的具体用法?C++ CAViewController::removeViewFromSuperview怎么用?C++ CAViewController::removeViewFromSuperview使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAViewController的用法示例。


在下文中一共展示了CAViewController::removeViewFromSuperview方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: popViewControllerAtIndex

CAViewController* CANavigationController::popViewControllerAtIndex(int index)
{
    if (index >= m_pViewControllers.size() || index < 0)
    {
        return NULL;
    }
    
    if (index == m_pViewControllers.size() - 1)
    {
        return this->popViewControllerAnimated(false);
    }
    
    CAViewController* viewController = m_pViewControllers.at(index);
    viewController->viewDidDisappear();
    viewController->m_pNavigationController = NULL;
    viewController->removeViewFromSuperview();
    viewController->retain()->autorelease();
    m_pViewControllers.erase(index);
    
    m_pContainers.at(index)->removeFromSuperview();
    m_pContainers.erase(index);
    
    m_pSecondContainers.erase(index);
    
    m_pNavigationBars.erase(index);
    
    return viewController;
}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:28,代码来源:CAViewController.cpp

示例2: popViewControllerFinish

void CANavigationController::popViewControllerFinish()
{
    CAViewController* lastViewController = m_pViewControllers.back();
    lastViewController->m_pNavigationController = NULL;
    lastViewController->removeViewFromSuperview();
    lastViewController->autorelease();
    m_pViewControllers.pop_back();
    m_pNavigationBar->popItem();
    m_pContainer->setFrame(CCRect(0, m_pContainer->getFrame().origin.y, 0, 0));
}
开发者ID:Rogerlin2013,项目名称:CrossApp,代码行数:10,代码来源:CAViewController.cpp

示例3: popViewControllerFinish

void CANavigationController::popViewControllerFinish()
{
    CAViewController* lastViewController = m_pViewControllers.back();
    lastViewController->viewDidDisappear();
    lastViewController->m_pNavigationController = NULL;
    lastViewController->removeViewFromSuperview();
    lastViewController->retain()->autorelease();
    m_pViewControllers.popBack();
    m_pNavigationBar->popItem();
    CAViewController* showViewController = m_pViewControllers.back();
    showViewController->getView()->setFrameOrigin(CCPointZero);
}
开发者ID:dlpc,项目名称:CrossApp,代码行数:12,代码来源:CAViewController.cpp

示例4: replaceViewControllerFinish

void CANavigationController::replaceViewControllerFinish()
{
    CAViewController* lastViewController = m_pViewControllers.back();
    lastViewController->retain()->autorelease();
    m_pViewControllers.popBack();
    m_pNavigationBar->popItem();
    lastViewController->viewDidDisappear();
    lastViewController->removeViewFromSuperview();
    
    CAViewController* viewController = m_pViewControllers.back();
    viewController->getView()->setFrameOrigin(CCPointZero);
    if (viewController->getNavigationBarItem() == NULL && viewController->getTitle().compare("") != 0)
    {
        viewController->setNavigationBarItem(CANavigationBarItem::create(viewController->getTitle()));
    }
    m_pNavigationBar->pushItem(viewController->getNavigationBarItem());
}
开发者ID:dlpc,项目名称:CrossApp,代码行数:17,代码来源:CAViewController.cpp

示例5: replaceViewControllerFinish

void CANavigationController::replaceViewControllerFinish()
{
    m_pContainer->setFrame(CCRect(0, m_pContainer->getFrame().origin.y, 0, 0));

    CAViewController* lastViewController = m_pViewControllers.back();
    m_pViewControllers.pop_back();
    m_pNavigationBar->popItem();
    lastViewController->removeViewFromSuperview();
    lastViewController->autorelease();

    CAViewController* viewController = m_pViewControllers.back();

    if (viewController->getNavigationBarItem() == NULL && viewController->getTitle().compare("") != 0)
    {
        viewController->setNavigationBarItem(CANavigationBarItem::create(viewController->getTitle()));
    }
    m_pNavigationBar->pushItem(viewController->getNavigationBarItem());
}
开发者ID:Rogerlin2013,项目名称:CrossApp,代码行数:18,代码来源:CAViewController.cpp

示例6: replaceViewControllerFinish

void CANavigationController::replaceViewControllerFinish()
{
    CAView* newContainer = m_pContainers.back();
    newContainer->setFrameOrigin(DPointZero);
    
    size_t index = m_pViewControllers.size() - 2;
    CAViewController* lastViewController = m_pViewControllers.at(index);
    lastViewController->viewDidDisappear();
    lastViewController->m_pNavigationController = NULL;
    lastViewController->removeViewFromSuperview();
    m_pViewControllers.erase(index);
    
    CAView* backContainer = m_pContainers.at(index);
    backContainer->removeFromSuperview();
    m_pContainers.erase(index);
    m_pSecondContainers.erase(index);
    m_pNavigationBars.erase(index);
    CAApplication::getApplication()->getTouchDispatcher()->setDispatchEventsTrue();
}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:19,代码来源:CAViewController.cpp

示例7: popViewControllerFinish

void CANavigationController::popViewControllerFinish()
{
    CAViewController* backViewController = m_pViewControllers.back();
    backViewController->viewDidDisappear();
    backViewController->m_pNavigationController = NULL;
    backViewController->removeViewFromSuperview();
    backViewController->retain()->autorelease();
    m_pViewControllers.popBack();
    
    m_pContainers.back()->removeFromSuperview();
    m_pContainers.popBack();
    
    m_pSecondContainers.popBack();
    
    m_pNavigationBars.popBack();
    
    m_pContainers.back()->setFrameOrigin(DPointZero);
    
    CAApplication::getApplication()->getTouchDispatcher()->setDispatchEventsTrue();
}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:20,代码来源:CAViewController.cpp

示例8: popFirstViewController

CAViewController* CANavigationController::popFirstViewController()
{
    if (m_pViewControllers.size() <= 1)
    {
        return NULL;
    }
    
    CAViewController* frontViewController = m_pViewControllers.front();
    frontViewController->viewDidDisappear();
    frontViewController->m_pNavigationController = NULL;
    frontViewController->removeViewFromSuperview();
    frontViewController->retain()->autorelease();
    m_pViewControllers.popFront();
    
    m_pContainers.front()->removeFromSuperview();
    m_pContainers.popFront();
    
    m_pSecondContainers.popFront();
    
    m_pNavigationBars.popFront();
    
    return frontViewController;
}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:23,代码来源:CAViewController.cpp

示例9: popToRootViewControllerFinish

// [email protected]: 2015-03-08
void CANavigationController::popToRootViewControllerFinish()
{
    while (m_pViewControllers.size() > 1)
    {
        CAViewController* backViewController = m_pViewControllers.back();
        backViewController->viewDidDisappear();
        backViewController->m_pNavigationController = NULL;
        backViewController->removeViewFromSuperview();
        m_pViewControllers.popBack();
        
        m_pContainers.back()->removeFromSuperview();
        m_pContainers.popBack();
        
        m_pSecondContainers.popBack();
        
        m_pNavigationBars.popBack();
    }
    
    m_pViewControllers.back()->getView()->setFrameOrigin(CCPointZero);
    
    m_bSlidingMinX = true;
    CAApplication::getApplication()->getTouchDispatcher()->setDispatchEventsTrue();
}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:24,代码来源:CAViewController.cpp


注:本文中的CAViewController::removeViewFromSuperview方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。