UIsplitviewcontroller 的后退按钮未正确响应
我正在创建一个应用程序,其中显示第一个主视图,其中有 6 个按钮。任何按钮选项卡都会导航到另一个视图控制器,我在其中以编程方式添加了分割视图控制器。在分割视图控制器的右视图控制器中包含带有自定义后退按钮的导航栏。当我按下后退按钮时,它必须导航到主视图控制器。但它不能正常工作。
我使用的后退按钮代码是
-(void)backBtnTap:(id)sender
{
[[self tabBarController] setSelectedIndex:0];
[self.navigationController popToRootViewControllerAnimated:YES];
[(AppDelegate*)[[UIApplication sharedApplication] 委托] backLoadData];
}
在 AppDelegate 方法中
-(void)backLoadData
{
[self.tabBarController.view removeFromSuperview];
[self.window reloadInputViews];
[self.window addSubview:self.tabBarController.view];
}
请帮我找到这样的解决方案
提前谢谢
I am creating an app in which it shows first master view with 6 buttons are present. any of button tab it navigate to another view controller in which i have added a split view controller programmatically. In the split view controller's right view controller contain navigation bar with custom back button. when i press the back button it must be navigate to master view controller. but it is not working currectly.
i have used the code for back button is
-(void)backBtnTap:(id)sender
{
[[self tabBarController] setSelectedIndex:0];
[self.navigationController popToRootViewControllerAnimated:YES];
[(AppDelegate*)[[UIApplication sharedApplication] delegate] backLoadData];
}
In the AppDelegate Method
-(void)backLoadData
{
[self.tabBarController.view removeFromSuperview];
[self.window reloadInputViews];
[self.window addSubview:self.tabBarController.view];
}
Please help me to find such a solution
Thanx in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案:终于我找到了解决方案。我在窗口中添加了根视图控制器,它工作得很好。
Solution: finally i have founded solution. I added the root view controller in my window in it's work perfectly.