| 304 | } |
| 305 | |
| 306 | void CANavigationController::setNavigationBarBackgroundColor(const CAColor4B &var) |
| 307 | { |
| 308 | m_sNavigationBarBackgroundColor = var; |
| 309 | CC_SAFE_RELEASE_NULL(m_pNavigationBarBackgroundImage); |
| 310 | |
| 311 | if (!m_pNavigationBars.empty()) |
| 312 | { |
| 313 | CADeque<CANavigationBar*>::iterator itr; |
| 314 | for (itr=m_pNavigationBars.begin(); itr!=m_pNavigationBars.end(); itr++) |
| 315 | { |
| 316 | if (m_pNavigationBarBackgroundImage) |
| 317 | { |
| 318 | (*itr)->setBackgroundView(CAScale9ImageView::createWithImage(m_pNavigationBarBackgroundImage)); |
| 319 | } |
| 320 | else |
| 321 | { |
| 322 | (*itr)->setBackgroundView(CAView::create()); |
| 323 | } |
| 324 | (*itr)->getBackgroundView()->setColor(m_sNavigationBarBackgroundColor); |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | const CAColor4B& CANavigationController::getNavigationBarBackgroundColor() |
| 330 | { |
nothing calls this directly
no test coverage detected