我有UITabBarController几个标签。当我单击UIButton第一个视图(选项卡)时,我想整个UITabBarController滑出并显示位于下方的新UIView视图UITabBarController。
当您开始播放视频时,youtube iPhone 应用程序上会发生类似的事情。
我将 UITabBarController 添加到 appDelegate 中的窗口,如下所示:
self.window.rootViewController = self.tabBarController;
解决方案:
[self.view.window insertSubview:welcomeViewController.view atIndex:0];
[UIView animateWithDuration:1.0 delay:0. options:UIViewAnimationOptionBeginFromCurrentState animations:^{
CGRect frame = self.tabBarController.view.frame;
frame.origin.x += 400;
self.tabBarController.view.frame = frame;
} completion:^(BOOL finished) {
//
}];