我有三個控制器和我想kown控制器是一個推或彈出IOS我怎麼知道該控制器是一個「推」或退回「啪」
控制器:
{
if(!b)
b = [B alloc] init];
[self.navigationController pushViewController:b animated:YES];
}
乙控制器:
- (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];
}
謝謝。
我不明白,請解釋一下 –
我不得不解決我的問題。你可以得到它嗎? – zt9788