Nsinvalidargumentexception What does this mean, I went online to check, each of the errors are different.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.