私は iOS 開発の初心者であり、UITableView の問題に関するヘルプを探しています。
さて、私は UITableView コードに関するすべてを研究していましたが、開発中に識別子を再利用しようとすると (インターフェイスに作成するセルがない場合)、XCode に次のメッセージが表示されます。
「'UITableView' の目に見える @interface はセレクター 'initWithStyle:reuseIdentifier: を宣言しません:」
コードがあります:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *identifier = @"Cell";
UITableView *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if(cell ==nil)
{
cell = [[[UITableView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier] autorelease];
}
誰かがここで私を助けてくれますか?