问题描述
限时送ChatGPT账号..更新:
我希望这会有所帮助.a b c d 是标签栏中的按钮.viewcontroller1 由 b 分隔 --> 没有标签栏.与 viewcontroller2 相同,它与 viewcontroller1 分离
i hope this helps. a b c d are the buttons in the tabbar. viewcontroller1 is segued by b --> no tabbar. the same with viewcontroller2, which is segued from viewcontroller1
Tabbar Controller
I
I_____ a
I
I_____ b ---- viewcontoller1
I I
I_____ c I__viewcontroller2
I
I_____ d
我一直在寻找解决方案,但没有任何方法帮助我.
Ive searched for solutions, but no approaches helped me.
在我的应用程序中,我有一个标签栏控制器作为初始视图.这个标签栏有 4 个视图.我想从这些视图之一切换到另一个视图.
In my app i have as initial view a tab bar controller. this tab bar has 4 views. I want to switch from one of these views to another view.
因此我使用segues.呈现目标视图后,不再有标签栏.
Therefore im using segues. After presenting the destination view, there is no tabbar anymore.
在情节提要中使用自适应转场 --> 显示(例如推送)
In the storyboard im using adaptives segues --> show (e.g. push)
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
[picker dismissViewControllerAnimated:NO completion:NULL];
self->takenImage = image;
double delayInSeconds = 0.5;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self performSegueWithIdentifier:@"OrtToBulldDetail" sender:self];
});
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if ([segue.identifier isEqualToString:@"OrtToBulldDetail"]){
BuildDetailView *editViewController =
(BuildDetailView *)segue.destinationViewController;
[editViewController setMyImage:takenImage];
}
}
我也尝试使用导航控制器,但目标视图加载了两次,并且我的状态栏与另一个状态栏重叠..
I also tried to use a navigation controller, but the destination view was load twice and my status bar was overlayed from another statusbar..
那么我的标签栏去哪里了?我怎样才能取回它?
so where does my tabbar go? How can i get it back?
推荐答案
如果您不使用导航控制器,则显示"转场会以模态方式呈现控制器,覆盖整个屏幕,包括标签栏.您应该将 b 控制器嵌入到导航控制器中,然后显示"segue 将推送到 viewcontroller1.
If you don't use a navigation controller, then a "Show" segue presents the controller modally which covers the entire screen, including the tab bar. You should embed the b controller in a navigation controller, then the "Show" segue will do a push to viewcontroller1.
I_____ UINavigationController------b ---- viewcontoller1
I_____ UINavigationController------b ---- viewcontoller1
这篇关于标签栏在 segue 后消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论