且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将UIViewController更改为UITableViewController?

更新时间:2023-02-16 20:30:51

听起来好像需要将Interface Builder中控制器实例的标识(换句话说是类)设置为自定义子类。

It sounds as though you need to set the identity (in other words the class) of the controller instance in Interface Builder to your custom subclass.

顺便说一下,IB中没有公开 UITableView tableView 属性,因为它本质上是一个sy 视图属性的nonym - 两个属性都引用相同的实例变量 _view tableView 属性只是更强类型。

By the way, the tableView property of UITableView isn't ever exposed in IB, because it's essentially a synonym for the view property -- the two properties both refer to the same instance variable, _view. The tableView property simply is more strongly typed.

只是附注:按照惯例,Objective-C类名应该以大写字母开头,即 ProcessViewController ,而不是 processViewController

Just a side note: by convention, Objective-C class names should begin with a capital letter, i.e., ProcessViewController, not processViewController.