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

Method setNavigationBarBackgroundImage

CrossApp/controller/CAViewController.cpp:276–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void 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
301CAImage* CANavigationController::getNavigationBarBackgroundImage()
302{

Callers 2

initUIViewMethod · 0.80

Calls 7

createWithImageFunction · 0.85
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setBackgroundViewMethod · 0.45
setColorMethod · 0.45
getBackgroundViewMethod · 0.45

Tested by

no test coverage detected