Storyboard - Hiding top bar of navigation controller programmatically

前端 未结 8 748
失恋的感觉
失恋的感觉 2020-12-13 14:11

I\'m using a storyboard and I\'m trying to hide a top bar of my main navigation controller when a certain button is pressed (or function is called). I know I have to initial

8条回答
  •  悲哀的现实
    2020-12-13 14:42

    There are 2 ways to hide top bar of Navigation Controller:

    1) Programatically

    [self.navigationController setNavigationBarHidden:YES animated:YES];
    

    2) Using Interface Builder

    You can uncheck "Shows Navigation Bar" in property list of Navigation Controller.

    Please make sure you have selected scene which contain Navigation Controller. Example image of scene.

提交回复
热议问题