[英]UINavigationController Interactive Pop Gesture cancellation Not Working in iOS 8?
[英]iOS - pop a view in the parent UINavigationController
以下是我目前的iPhone应用程序的制作方法:
UINavigationControllerA [viewA1 viewA2 viewA3]
viewA3 leads to UITabBarControllerB [viewB1 viewB2]
viewB2 leads to UINavigationControllerC [viewC1 viewC2]
我使用自定义导航栏,一切都很有效。
我唯一的问题是在UINavigationControllerC的视图中我在我的自定义导航栏中放置了一个UIBarButton,它应该链接到viewA3 ,但是我失败了。
我知道我不能这样做:
[self.navigationController popToRootViewControllerAnimated:YES];
因为UINavigationControllerC!= UINavigationControllerA。
有没有办法获得父UINavigationController?
有没有可以用来在UINavigationControllerC中保存UINavigationControllerA的技巧?
Thx提前
访问self.tabBarController.navigationController
而不是self.navigationController
?
但这可能不起作用,因为Apple明确声明不支持在UINavigationController
中放置UITabBarController
。
另一个选择是使用以下内容从appdelegate访问根导航控制器:
((MyAppDelegate *)[UIApplication sharedApplication].delegate).yourNavigationController
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.