开发者

how to push or pop viewcontroller through delegation?

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 popViewContr开发者_开发技巧ollerAnimated: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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜