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
{开发者_Python百科
#warning Incomplete method implementation.
// Return the number of rows in the section.
return 3;
}
The #warning
directive, appropriately enough, causes the compiler to emit a warning. Delete those two lines and the warnings should go away.
精彩评论