| 389 | } |
| 390 | |
| 391 | void CANavigationController::updateItem(CAViewController* viewController) |
| 392 | { |
| 393 | size_t index = m_pViewControllers.getIndex(viewController); |
| 394 | CC_RETURN_IF(index == -1); |
| 395 | if (index == 0) |
| 396 | { |
| 397 | viewController->getNavigationBarItem()->setShowGoBackButton(false); |
| 398 | } |
| 399 | |
| 400 | if (m_pNavigationBarBackgroundImage) |
| 401 | { |
| 402 | m_pNavigationBars.at(index)->setBackgroundView(CAScale9ImageView::createWithImage(m_pNavigationBarBackgroundImage)); |
| 403 | } |
| 404 | else |
| 405 | { |
| 406 | m_pNavigationBars.at(index)->setBackgroundView(CAView::create()); |
| 407 | m_pNavigationBars.at(index)->getBackgroundView()->setColor(m_sNavigationBarBackgroundColor); |
| 408 | } |
| 409 | |
| 410 | m_pNavigationBars.at(index)->setTitleColor(m_sNavigationBarTitleColor); |
| 411 | m_pNavigationBars.at(index)->setTitleColor(m_sNavigationBarTitleColor); |
| 412 | m_pNavigationBars.at(index)->setItem(viewController->getNavigationBarItem()); |
| 413 | } |
| 414 | |
| 415 | void CANavigationController::viewDidLoad() |
| 416 | { |
no test coverage detected