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));
}
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());
}