【发布时间】:2012-11-05 05:19:22
【问题描述】:
我有三个控制器,我想知道控制器是推送还是弹出
控制器:
{
if(!b)
b = [B alloc] init];
[self.navigationController pushViewController:b animated:YES];
}
B 控制器:
- (void) viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
//I want here to judge, from the "A" push over, or to return from the "C" "pop"
//if it is push from A
//dosomething.....
//if it is pop from C
//dosomething
}
-(void)testAction:(id)sender
{
C *c = [[C alloc] init];
[self.navigationController pushViewController:b animated:YES];
[c release];
}
C 控制器:
{
[self.navigationController popViewControllerAnimated:YES];
}
谢谢。
【问题讨论】:
-
没看懂,请多解释一下
-
我已经解决了我的问题。可以吗?
标签: ios pushviewcontroller viewdidappear popviewcontroller