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

Method setNavigationBarHidden

CrossApp/controller/CAViewController.cpp:911–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909}
910
911void CANavigationController::setNavigationBarHidden(bool hidden, bool animated)
912{
913 CC_RETURN_IF(m_bNavigationBarHidden == hidden);
914 m_bNavigationBarHidden = hidden;
915 CC_RETURN_IF(this->getView()->getSuperview() == NULL);
916
917 if (animated)
918 {
919 CAAnimation::schedule(CAAnimation_selector(CANavigationController::navigationBarHiddenAnimation), this, 0.25f);
920
921 CAViewAnimation::beginAnimations("", NULL);
922 CAViewAnimation::setAnimationDuration(0.25f);
923 CAViewAnimation::setAnimationWillStartSelector(CAApplication::getApplication()->getTouchDispatcher(), CAViewAnimation0_selector(CATouchDispatcher::setDispatchEventsFalse));
924 CAViewAnimation::setAnimationDidStopSelector(CAApplication::getApplication()->getTouchDispatcher(), CAViewAnimation0_selector(CATouchDispatcher::setDispatchEventsTrue));
925 CAViewAnimation::commitAnimations();
926 }
927 else
928 {
929 m_fProgress = 1.0f;
930
931 if (this->getView()->getSuperview())
932 {
933 this->update(0);
934 }
935 }
936}
937
938int CANavigationController::getNavigationBarNowY(CAViewController* viewController)
939{

Calls 5

updateMethod · 0.95
scheduleFunction · 0.85
getSuperviewMethod · 0.80
getViewMethod · 0.80
getTouchDispatcherMethod · 0.80

Tested by

no test coverage detected