MCPcopy Create free account
hub / github.com/9miao/CrossApp / updateItem

Method updateItem

CrossApp/controller/CAViewController.cpp:391–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void 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
415void CANavigationController::viewDidLoad()
416{

Calls 11

createWithImageFunction · 0.85
getIndexMethod · 0.80
setShowGoBackButtonMethod · 0.80
isEqualMethod · 0.80
replaceItemAtIndexMethod · 0.80
setBackgroundViewMethod · 0.45
setColorMethod · 0.45
getBackgroundViewMethod · 0.45
setTitleColorMethod · 0.45
setItemMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected