データをロードしようとしている TableView があります。表示からNSLog
、データは正しく存在しています。ただし、次のメソッドは呼び出されていません。たとえば、NSLog
コメントがまったく表示されません。
- (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];
// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
}
NSString *cellValue = [listOfStates objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
return cell;
NSLog(@"Passed: cellForRowAtIndexPath");
}
同様に、init も実行されていません。存在する場合、initは常に実行されていましたか?
- (id)init {
if ((self = [super init])) {
listOfStates = [[NSMutableArray alloc] init];
stateName = [[NSString alloc] init];
NSLog(@"INIT StateName %@", stateName);
}
return self;
NSLog(@"Passed: init");
}
何か案は?