2012-09-17 37 views
1
- (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 [(NSSet *)[team valueForKey:@"players"] count]; 
} 

我该如何解决?iOS我收到关于UITableViewDataSource的不完整实施的警告

+1

他们警告你不要忘记从这些函数的返回值。你可以删除它们。 – Scar

+0

是的,我知道他们是警告@Scar。我该如何纠正它们?我确实返回了一个值,它仍然给我警告。 –

+2

看来我的评论的最后一部分对你是看不见的;) – Scar

回答

6

你返回值,只是删除行:

#warning Potentially incomplete method implementation. 

#warning Incomplete method implementation. 
+0

感谢您的帮助 –

+0

很高兴帮助! @Cocoa Dev – Salmo

+0

只是好奇,我有同样的问题,我已经删除了行,他们仍然在空白行显示警告。我能做什么?我确实在每种方法中都会返回 – Beanno1116