[英]Possible to slide down UITabBarController?
我确定我已经在某个地方看到了此代码,但是我找不到它...
我希望能够以编程方式向下滑动UITabBarController…不是在过渡到另一个视图时而是在同一视图中。
如果要上下滑动UITabBar
,可以尝试以下操作:
- (IBAction)showHideTabBar:(id)sender {
static BOOL isShowing = YES;
CGRect tabBarFrame = self.tabBarController.tabBar.frame;
if (isShowing) {
tabBarFrame.origin.y += tabBarFrame.size.height;
}
else {
tabBarFrame.origin.y -= tabBarFrame.size.height;
}
isShowing = !isShowing;
[UIView animateWithDuration:0.3 animations:^ {
[self.tabBarController.tabBar setFrame:tabBarFrame];
}];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.