pushViewController without navigationcontroller

前端 未结 5 1467
执念已碎
执念已碎 2020-12-31 06:54

I have a class that is of type UITableViewController. This class has a member of type UINavigationBar that I use for adding in an edit button for t

5条回答
  •  生来不讨喜
    2020-12-31 07:15

    You can't push a view controller onto a navigation controller if there is no navigation controller. If you are wanting to be pushing controllers and have it display the topmost controller and everything, just use a UINavigationController and be done with it.

    You can push arbitrary UINavigationItems onto your UINavigationBar, and your bar's delegate will be notified when the user uses the back button so you can take appropriate action. See the documentation for more information.

提交回复
热议问题