0

I have rootcontroller with navigation system. what I want to do is pop an old stack and add new stack through delegation. For example, (1) call method contains pop currentview and delegation. (2)in rootview, it receives delegation and push a new stack to it self.

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 only returns to root controller but adding new view. I can find overlapping 'back' button on the navigation bar after I invoke the method.

user842589
  • 107
  • 2
  • 12

1 Answers1

2

The animations are blocking your view to be created. Hence either you can turn off the animations or you can add a delay before displaying the other view.

performSelectorOnMainThread:withObject: afterDelay: waitUntilDone:YES
Praveen S
  • 10,355
  • 2
  • 43
  • 69