iTahDoodle #pragma mark -Table View Management


I’m a little stuck. This is the first code example in the book that doesn’t explicitly say where to insert the code, …so the first issue may be that I have inserted the code in the wrong place. The second issue would be the errors. An error and a warning (in bold below)


—code snippet–>

// Finalize the window and put it on the screen
[[self window] setBackgroundColor:[UIColor whiteColor]];
[[self window] makeKeyAndVisible];

return YES;


// I’m not sure where to put this next bit… not specified in the book, hoping this is correct —>

#pragma mark - Table View Management

  • (NSIngeger)tableView:(UITableView *)tableView // <-- Error Expected a type
    // Because this table view only has one section,
    // the number of rows in it is equal to the number
    // of items in our tasks array
    return [tasks count]; // <-- Warning Incompatible integer to pointer conversion returning “NSUInteger”

  • (UITableViewCell *)tableView:(UITableView *)tableiew
    cellForRowAtIndexPath:(NSIndexPath *)indexPath


I have this same question. Where does this bit including and following #pragma mark - Table View management go?


[color=#FF0000]NSIngeger[/color] is not a type; please check your typing first.


Same issue here and I don’t see an answer on this board. It is very strange that this is the point where we don’t get advised as to where the code goes. Can someone please clarify?


OK I just saw this response from Aaron in one of the threads at the end of this forum.

Re: Implementing callbacks on page 187

Postby AaronHillegass » Wed Dec 07, 2011 4:01 pm
The order of the methods between @implementation and @end doesn’t matter.

This kind of blows my mind, but I will go with it and try to understand it later. I was under the impression that the order of all of this code mattered.