开发者

How to assign the backbutton in the navigation bar to ouais own custom button?

开发者 https://www.devze.com 2023-02-25 05:14 出处:网络
I\'m actually on a project and I have to hide the navigation bar. And instead,开发者_StackOverflow社区 I want to use my own custom button. Could you advise please?

I'm actually on a project and I have to hide the navigation bar. And instead,开发者_StackOverflow社区 I want to use my own custom button. Could you advise please?

Is there something like pullviewcontroller that does that?


You can call popViewControllerAnimated: on navigation controller yourself to return to previous view controller.


you could use your UIViewController life cycle function to set you navigation bar hide and shown ,

- (void) viewWillAppear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    [super viewWillAppear:animated];
}

- (void) viewWillDisappear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:NO animated:animated];
    [super viewWillDisappear:animated];
}
0

精彩评论

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