| 274 | } |
| 275 | |
| 276 | void CANavigationController::setNavigationBarBackgroundImage(CrossApp::CAImage *var) |
| 277 | { |
| 278 | CC_SAFE_RETAIN(var); |
| 279 | CC_SAFE_RELEASE_NULL(m_pNavigationBarBackgroundImage); |
| 280 | m_pNavigationBarBackgroundImage = var; |
| 281 | m_sNavigationBarBackgroundColor = CAColor_white; |
| 282 | |
| 283 | if (!m_pNavigationBars.empty()) |
| 284 | { |
| 285 | CADeque<CANavigationBar*>::iterator itr; |
| 286 | for (itr=m_pNavigationBars.begin(); itr!=m_pNavigationBars.end(); itr++) |
| 287 | { |
| 288 | if (m_pNavigationBarBackgroundImage) |
| 289 | { |
| 290 | (*itr)->setBackgroundView(CAScale9ImageView::createWithImage(m_pNavigationBarBackgroundImage)); |
| 291 | } |
| 292 | else |
| 293 | { |
| 294 | (*itr)->setBackgroundView(CAView::create()); |
| 295 | } |
| 296 | (*itr)->getBackgroundView()->setColor(m_sNavigationBarBackgroundColor); |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | CAImage* CANavigationController::getNavigationBarBackgroundImage() |
| 302 | { |
no test coverage detected