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

Method setTabBarHidden

CrossApp/controller/CAViewController.cpp:1593–1619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1591}
1592
1593void CATabBarController::setTabBarHidden(bool hidden, bool animated)
1594{
1595 CC_RETURN_IF(m_bTabBarHidden == hidden);
1596 m_bTabBarHidden = hidden;
1597 CC_RETURN_IF(this->getView()->getSuperview() == NULL);
1598
1599 if (animated)
1600 {
1601 CAAnimation::schedule(CAAnimation_selector(CATabBarController::tabBarHiddenAnimation), this, 0.25f);
1602
1603 CAViewAnimation::beginAnimations("", NULL);
1604 CAViewAnimation::setAnimationDuration(0.3f);
1605 CAViewAnimation::setAnimationWillStartSelector(CAApplication::getApplication()->getTouchDispatcher(), CAViewAnimation0_selector(CATouchDispatcher::setDispatchEventsFalse));
1606 CAViewAnimation::setAnimationDidStopSelector(CAApplication::getApplication()->getTouchDispatcher(), CAViewAnimation0_selector(CATouchDispatcher::setDispatchEventsTrue));
1607 CAViewAnimation::commitAnimations();
1608 }
1609 else
1610 {
1611 m_fProgress = 1.0f;
1612
1613 if (this->getView()->getSuperview())
1614 {
1615 this->update(0);
1616 }
1617 }
1618
1619}
1620
1621void CATabBarController::tabBarHiddenAnimation(float delay, float now, float total)
1622{

Calls 5

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

Tested by

no test coverage detected