简体   繁体   English

身份检查器未显示将类连接到TableViewController的选择

[英]identity inspector doesn't show choices for connecting a class to tableviewcontroller

I added a tableviewcontroller to my story board. 我在故事板上添加了一个tableviewcontroller。 I have two regular viewcontrollers currently and i've been able to in the identity inspector go to custom class, click the down arrow next to the class name there, then select from classes in the project to connect a class. 我目前有两个常规的视图控制器,并且已经可以在身份检查器中转到自定义类,单击那里的类名称旁边的向下箭头,然后从项目中的类中选择以连接一个类。 With this tableviewcontroller, it just shows Class:UITableViewController with no other choices in the drop down. 使用此tableviewcontroller,它仅显示Class:UITableViewController,而下拉菜单中没有其他选择。 Is this normal for table view controllers? 这对于表视图控制器是正常的吗? This is my first time working with one and i'll be learning as I go this morning. 这是我第一次与一个人一起工作,今天早上我将学习。

I did try typing in the name of my custom tableviewcontroller class and while it accepted the name i can tell it's not working. 我确实尝试输入自定义tableviewcontroller类的名称,虽然它接受了该名称,但我可以断定它不起作用。 i added to view did load of this custom class, 我添加了查看此自定义类的负载,

self.view.backgroundColor = [UIColor redColor];

and that didn't seem to do anything. 而且似乎没有任何作用。 I also changed number of rows returned to 4 and that didn't seem to do anything. 我还更改了返回到4的行数,这似乎没有任何作用。

I am loading it with the associated view controller i created. 我正在用我创建的关联视图控制器加载它。

ChannelColorsTableViewController *vc = [mainStoryboard    instantiateViewControllerWithIdentifier:@"ChannelColors"];
[self presentModalViewController:vc animated:NO];  

thanks Mike 谢谢迈克

问题是我在故事板上添加了一个tableviewcontroller,但是当我创建班级时我犯了一个错误,它是从tableview继承的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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