Reputation: 302
I am newbie to ios development and i am just learning tableview with custom table cell,I used storyboard for making ui elements and for the custom cell i have made an xib file,I have referred.Custom tableview i ios
I have gone every steps but i dont know what is missing,i am getting following error.
2015-12-03 16:52:48.336 MyFirstApp[4997:176795] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<netcluesvideosViewController 0x7a05a6b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nameLabel.'
I am posting my code please help,
net.h
@interface netcluesvideosViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
NSArray *tabledata;
IBOutlet UITableView *tableView;
}
@end
net.m
.
.
.
.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"NetCell";
NetCell *cell = (NetCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"NetCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
.
.
.
.
NetCell is my custom cell class.
Upvotes: 1
Views: 100
Reputation: 653
you have to remove IBOutlet in interface builder for nameLabel, or add
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
to your view controller child class.
Upvotes: 1