當我輸入Xcode的規劃問題的tableview - 「控制到達非void函數結束」
-(NSInteger) numberOfSectionsInTabelVieuw:(UITableView *)tabelVieuw{
return 1;
}
-(NSInteger)tabelVieuw:(UITableView *)tabelvieuw numberOfRowsInSection:(NSInteger)section{
return [soundTitles count];
}
-(UITableViewCell *)tabelview:(UITableView *)tabelvieuw cellForRowATIndexPath:(NSIndexPath *)Indexpath
{
static NSString *CellIndentiefier [email protected]"cell";
UITableViewCell *cell =[tabelVieuw dequeueReusableCellWithIdentifier:CellIndentiefier];
if(cell ==Nil) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIndentiefier];
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
cell.accessoryType= UITableViewCellAccessoryDisclosureIndicator;
}
}
//CONFUGURE THE CELL
cell.textLabel.text =[soundTitles objectAtIndex:Indexpath.row];
;
}
我得到的總是在最後}
得到一個警告。 它說:control reaches, end of non-void function
順便說一句,你拼寫錯了所有的方法名稱,所以他們都不會被調用。 – jlehr