标签:
我几乎把所有的东西都注释了,但还是崩了
#import "ViewController.h"
//#import "WeiBo.h"
@interface ViewController ()//<UITableViewDataSource,UITableViewDelegate>
//@property (nonatomic ,strong) NSArray * statuses;
@end
@implementation ViewController
//-(NSArray *)statuses{
//
// if (!_statuses) {
// _statuses = [WeiBo weiboList];
// }
//
// return _statuses;
//}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
// NSLog(@"%d",self.statuses.count);
return 10;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString * reuseID = @"weibo";
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseID];
if (!cell) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseID];
}
// WeiBo * weibo = self.statuses[indexPath.row];
// cell.imageView.image = [UIImage imageNamed:weibo.icon];
cell.textLabel.text = @"11";
return cell;
}
@end
错误内容:
2016-02-28 20:52:03.021 weibo[2661:180833] -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x7af74ed0
2016-02-28 20:52:03.025 weibo[2661:180833] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘-[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x7af74ed0‘
*** First throw call stack:
NSInvalidArgumentException这个到底是什么意思,我到网上查了下,每个的错误都不同。
标签:
原文地址:http://www.cnblogs.com/kongfutiger/p/5225598.html