*** Terminating app due to uncaught exception 'NSInternalInconsistencyException'
===

I've seen this same error on StackOverflow, and it seems to be called if you are returning no objects(return 0) back in the cellForRowAtIndex method.  But I have mine set to return the cell, unless it is saying that my cell isn't returning back anything?  In that case I have a different problem.  I don't believe my return statement is "out of bounds" it is within the if loop.  Can anyone see what may be causing it?  This shouldn't have anything to do with my Storyboard setup and configuration, I don't believe?


    #import "LWWBidTaskListController.h"

    @interface LWWBidTaskListController ()
    @property (strong, nonatomic)NSArray *tasks;

    @end

    @implementation LWWBidTaskListController

    @synthesize tasks;

    - (id)initWithStyle:(UITableViewStyle)style
    {
    self = [super initWithStyle:style];
    if (self) {
        // Custom initialization
    }
    return self;
    }

    - (void)viewDidLoad
    {
    [super viewDidLoad];
    
    self.tasks = [NSArray arrayWithObjects: @"Walk the dog", @"URGENT:Buy milk", @"Clean     hidden lair", @"Invent miniature dolphins", @"Find new henchmen", @"Get revenge on do-gooder heroes", @"URGENT: Fold laundry", @"Hold entire hold hostage", @"Manicure", nil];

    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
 
    // Uncomment the following line to display an Edit button in the navigation bar for this     view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
    }

    - (void)viewDidUnload
    {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    self.tasks = nil;
    }

    - (BOOL)shouldAutorotateToInterfaceOrientation:    (UIInterfaceOrientation)interfaceOrientation
    {
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
    }

    #pragma mark - Table view data source

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
    //#warning Potentially incomplete method implementation.
    // Return the number of sections.
    //return 0;
    return 1;
    }

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
    //#warning Incomplete method implementation.
    // Return the number of rows in the section.
    //return 0;
    return [tasks count];
    }

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:    (NSIndexPath *)indexPath//populates each cell
    {
    //static NSString *CellIdentifier = @"Cell";
    //UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
    
    NSString *identifier = nil;
    NSString *task = [self.tasks objectAtIndex:indexPath.row];
    NSRange urgentRange = [task rangeOfString:@"URGENT"];
    if (urgentRange.location == NSNotFound)
    {
        identifier = @"plainCell";
    }
    else 
    {
        identifier = @"attentionCell";
    }
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    
    // Configure the cell...
    
    UILabel *cellLabel = (UILabel *)[cell viewWithTag:1];
    cellLabel.text = task;
    
    return cell;
    }


