1

I am new to ios programming... I am trying to implement custom tableview for my project but when I run project shows this error message.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "dmm-Pc-xYV-view-9s3-ps-qP9" nib but didn't get a UITableView.'

TableViewController.m

@implementation TipsTableViewController
@synthesize marrTips;

- (void)viewDidLoad {
[super viewDidLoad];
_barButton.target=self.revealViewController;
_barButton.action=@selector(revealToggle:);
[self.view 
addGestureRecognizer:self.revealViewController.panGestureRecognizer];


self.marrTips = [NSMutableArray arrayWithCapacity:3];

Tips *tip = [[Tips alloc] init];
tip.day = @"Today";
[self.marrTips addObject:tip];

tip.day = @"Yesterday";
[self.marrTips addObject:tip];

tip.day = @"Previous Day";
[self.marrTips addObject:tip];


}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView 
numberOfRowsInSection:(NSInteger)section
{
return [marrTips count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView 
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

static NSString *cellIdentifier = @"TipsCell";
TipsTableViewCell *cell = [tableView 
dequeueReusableCellWithIdentifier:cellIdentifier 
forIndexPath:indexPath];

Tips *tip = (self.marrTips)[indexPath.row];
cell.lblDay.text = tip.day;


return cell;
}

TableViewController.h

@interface TipsTableViewController : UITableViewController<UITableViewDataSource,UITableViewDelegate>
rjdkolb
  • 10,377
  • 11
  • 69
  • 89
Jubair O
  • 11
  • 2
  • Possible duplicate of [NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle](https://stackoverflow.com/questions/12722461/nsinternalinconsistencyexception-reason-could-not-load-nib-in-bundle-nsbun) – Pipiks Jul 22 '17 at 08:34

0 Answers0