我想使用CoreData來填充一個UITableView。我一直在使用開發人員「位置」項目,並且我認爲我擁有一切正確。但是,現在我在構建時出現以下錯誤:iPhone核心數據:請求成員'tableView'在某些不是結構或工會
request for member 'tableView' in something not a structure or union
爲什麼會對tableView感到困惑?我在這些方法中使用了很多次。錯誤似乎來自:
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
想法?
它看起來對我來說。 @interface MyRidesViewController:UIViewController {} –
2010-05-10 02:56:24
您需要繼承UITableViewController而不是UIViewController。 – 2010-05-10 05:08:05