これは何度も繰り返し尋ねられています。私はすべての解決策を試しましたが、それでもうまくいきませんでした。私は、データソースを設定し、私のテーブルビューに委任し、また私のポインタに設定します。私は私のviewDidLoad:
方法にreloadData
と呼ばれてきましたReloadDataはcellForRowAtIndexPathを起動しません
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
NSLog(@"%i", resultSoap.count);
return resultSoap.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell.
NSString *cellValue = [resultSoap objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
NSLog(@"Celldisplay");
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
:
は、ここに私のコードです。問題は、それはnumberOfRowsInSection:
メソッドを起動し、私は正しい行カウントを取得しますが、それはこのcellForRowAtIndexPath:
メソッドを起動しませんでした。
戻っている行は何行ですか?デバッグモードでは、resultSoapの内容を見ることができますか? – Peres