使用传统的UITabBar + UINavigationController
设计范例,您如何实现 Instagram 中央标签点击的效果 - 整体UITabBarController
下来揭示UIViewController
负责拍照的捕获。
你如何复制这种行为?对我来说最有趣的部分是,您如何将模态视图放在实际视图下方UITabBarController
?现在我能做到的最接近的是UIViewController
用传统的UIModalTransitionStyleCoverVertical
演示风格呈现一个,这完全不是我想要的:
- (void)viewWillAppear:(BOOL)animated{
if (!recordDisplayed){
SGRecordViewController *customController = [[SGRecordViewController alloc] init];
customController.modalPresentationStyle = UIModalPresentationFormSheet;
customController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:customController animated:YES completion:nil];
recordDisplayed = YES;
previousIndex = [self tabBarController].selectedIndex;
}else{
[self tabBarController].selectedIndex = previousIndex;
recordDisplayed = NO;
}
}