I almost commented on everything, but it still collapsed.
#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];
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
Error content:
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 ', re Ason: '-[uiviewcontroller tableview:numberofrowsinsection:]: Unrecognized selector sent to instance 0x7af74ed0 '
First throw Call stack:
Nsinvalidargumentexception What does this mean, I went online to check, each of the errors are different.