nib but didn't get a UITableView

后端 未结 13 1678
误落风尘
误落风尘 2020-11-30 05:26

My application works for iOS 5.1 but for iOS 6 simulator I get the following error.

Terminating app due to uncaught exception \'NSInternalInconsist

13条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 06:06

    If you use UITableView as your Top View.

    Like this :

    You need use UITableViewController in your Controller

    class ItemsViewController: UITableViewController
    

    If you use UITableView under a View in your Storyboatd.

    Like this :

    You need use UITableViewDelegate and UITableViewDataSource with UIViewController

    class ItemsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource
    

提交回复
热议问题