1
我一直试图弄清楚这一点现在,但我达到了一个点,我似乎无法通过阅读其他Q & As来解决我的问题。我试图让UINavigationController中的活动UIViewController发送popViewController/pushViewController消息到UINavigationController,但我无法弄清楚。我可能在做一些相当愚蠢的事情,导致它破裂。结构应该是这样的,但即使如此,我不确定我是否做得对。 secondViewController我如何pushViewController /等。从UIViewController子类?
- mainController
- primaryNavigationController
- firstViewController
- primaryNavigationController
firstViewController和secondViewController均为A S ubclass
mainController.m
firstViewController = [[FirstTestViewController alloc] init];
secondViewController = [[FirstTestViewController alloc] init];
primaryNavigationController = [[UINavigationController alloc]
initWithRootViewController:firstViewController];
[primaryNavigationController.view setFrame:CGRectMake(0,0,320i,409)];
[self.view addSubview:[primaryNavigationController view]];
[primaryNavigationController.navigationBar setFrame:CGRectMake(0,0,20,44)];
primaryNavigationController.navigationBar.tintColor = [UIColor blackColor];
我怎么能告诉primaryNavigationController推/从firstTestViewController子类中弹出一个VC?
非常感谢,这正是我所期待的。我的问题是,我添加了[self.primaryNavigationController而不是[self.navigationController。 – 2010-10-29 05:22:05