ios - super viewdidload 给我一个不可见的@interface for uitableview 为选择器 viewdidload 声明

标签 ios selector visible viewdidload

这是我当前的代码。我什至没有通过 viewDidLoad 方法覆盖,因为在它说 super viewdidload 的那一行它抛出错误 @interface for uitableview 为选择器 viewdidload 声明。

我不太熟悉 iPhone 开发,而且我还在起步阶段。有人可以帮我解决这个问题

我的代码

@interface myUITVC : UITableViewController UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) NSMutableArray *array;

@end


@implementation myUITVC

-(void)viewDidLoad
{
[super viewDidLoad];
}

@end

最佳答案

  1. 如果您继承 UITableViewController(因为 UITableViewController 已声明它),则不必声明表委托(delegate)和数据源。

    改变

    @interface myUITVC : UITableViewController UITableViewDelegate, UITableViewDataSource>
    

    @interface myUITVC : UITableViewController
    
  2. 您在 viewDidLoad 中缺少大写“D”。

关于ios - super viewdidload 给我一个不可见的@interface for uitableview 为选择器 viewdidload 声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22110471/

相关文章:

iphone - 如何使用 RubyMotion 进行本地化?

ios - 无法访问自定义单元格中的标签

android - 单击列表中的项目时如何使用选择器

ios - -[UIViewController tableView :numberOfRowsInSection:]: unrecognized selector sent to instance

HTML 中的 javascript 如何使隐藏图像在函数调用中可见?

javascript - 使程序范围选择对用户可见?

ios - 在 google+ IOS Swift 中分享

javascript - Font Awesome 图标未在 Phonegap iOS 应用程序中呈现

jquery - 将类添加到单选项目父级、删除和添加类的最佳方法

iOS: TextView 中可见文本的范围