这是我当前的代码。我什至没有通过 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
最佳答案
如果您继承 UITableViewController(因为 UITableViewController 已声明它),则不必声明表委托(delegate)和数据源。
改变
@interface myUITVC : UITableViewController UITableViewDelegate, UITableViewDataSource>
到
@interface myUITVC : UITableViewController
您在
viewDidLoad
中缺少大写“D”。
关于ios - super viewdidload 给我一个不可见的@interface for uitableview 为选择器 viewdidload 声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22110471/