Modal segue, navigation bar disappears

前端 未结 11 1211
既然无缘
既然无缘 2020-12-01 04:30

I\'m using Xcode 4.6.1 to code on Objective-C. I want to know how can I keep the navigation bar shown when I create a modal segue between 2 View controllers, because I\'m do

11条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 04:41

    In order to show a navigation bar on a modal view controller, one way is to insert a navigation controller. You set the segue to this navigation controller as "Present Modally" and can set the presentation to "Full Screen" if needed.

    Here's how it might look in Interface Builder, note that the "Title" and "Item" button will show now that we have inserted a navigation controller as the target of our segue.

提交回复
热议问题