iOS我收到有关UITableViewDataSource实现不完整的警告

Coc*_*Dev 1 xcode warnings uitableview

- (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];
}
Run Code Online (Sandbox Code Playgroud)

我如何解决它?

Sal*_*lmo 6

你正在返回值,只需删除这些行:

#warning Potentially incomplete method implementation.

#warning Incomplete method implementation.
Run Code Online (Sandbox Code Playgroud)