简体   繁体   中英

How to remove table view from a XIB?

I would like to create a navigation based application without the Table View stuff... when I select "navigation based application" at the project start, I get a Root view that inherits from UITableViewController... I wish to inherit from UINavigationController and delete all the table methods in the implementation file... question is...

how do I change the XIB in interface builder to give a simple UIView rather than UITableView?

please and thank you

In the Objects list, select the TableView, press Delete.

在此处输入图片说明

Then drag in whatever type of view you want, like a NavBar controller.

It is simple, but some people forget a few steps.

  1. delete the table view
  2. add a view
  3. make sure to wire up the outlet for the viewcontroller.view
  4. in the .h file change the super class to view controller, rather than tableview controller.

首先从.xib中删除UITableView,然后在.xib中添加视图,并从.h类中删除UITableViewController并使用UIViewController对其进行编辑。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM