2012-09-17 41 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