how to add uinavigation controller in a view based application

前端 未结 4 1117
甜味超标
甜味超标 2021-01-23 01:15

I wanted to add a navigation controller to a view based application . how can we do this both programmatically and using xib file..

4条回答
  •  旧巷少年郎
    2021-01-23 01:52

    You can just drag a "Navigation Bar" from your objects in the bottom right corner of Interface Builder. This basically does what Sachin says in his answer but you still have to programmatically create the functionality of the navigation controller. I.e pushing new views to the stack and poping them off.

    In my opinion it's easiest to do it entierly in the code.

提交回复
热议问题