开发者

Go back 1 step in navigationbar?

I want a butt开发者_如何学运维on to have the same effect that pressing the back button in the navigation would have, where the view goes back to the last view.

How do i do this?


Add a method to your view controller:

-(IBAction)goBack:(id)sender
{
     [self.navigationController popViewControllerAnimated:YES];
}

And add the button in IB, hook up the touchupInside event to the newly added goBack: method you just added.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜