How to click or pop view controller through delegation?

I have a rootcontroller with a navigation system. what i want to do is put the old stack and add a new stack through delegation. For example, (1) the invocation method contains pop currentview and delegation. (2) in root mode, it receives delegation and pushes a new stack on it.

currentviewcontroller.m

-(void)chooseSticker:(id)sender{ [self.navigationController popViewControllerAnimated:YES]; [self.delegate returnSetView]; } 

rootviewcontroller.m

 -(void) returnSetView{ SetToolController *setController = [[SetToolController alloc]initWithNibName:@"SetToolController" bundle:nil]; [self.navigationController pushViewController:setController animated:YES]; [setController release]; } 

It returns only to the root controller, but adds a new view. I can find the overlapping back button in the navigation bar after calling the method.

0
iphone
source share
1 answer

Animations block the creation of your view. Therefore, you can turn off the animation or add a delay before displaying another view.

 performSelectorOnMainThread:withObject: afterDelay: waitUntilDone:YES 
+2
source share

All Articles