Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableViewController: what's with the incomplete method implementation warnings?

I'm working on my first iOS/Cocoa Touch app, and to handle user settings, I need to build a few table views for a navigation controller. At any rate, I created a custom UITableViewController, and pushed it on my UINavigationController. I didn't change a thing (except the return numbers) in the following two methods, but they kick out warnings in XCode. What gives?

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

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
#warning Incomplete method implementation.
// Return the number of rows in the section.
return 3;
}
like image 843
Gregir Avatar asked Mar 28 '11 02:03

Gregir


1 Answers

The #warning directive, appropriately enough, causes the compiler to emit a warning. Delete those two lines and the warnings should go away.

like image 85
Anomie Avatar answered Sep 21 '22 06:09

Anomie