0

私はコードをもっている

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.objectIdArray.count;
}

このメソッドは7を返しました。デバッグモードで確認しましたが、デリゲートメソッドなど

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// !!!!!!!!!!!!!
        NSLog(@"%d\n",self.objectIdArray.count);
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OrderListCell"];
        if (cell == nil) {
            NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"OrderListCell" owner:nil options:nil];
            cell = [topLevelObjects lastObject];
            [((OrderListCell *) cell).activityIndicatorView startAnimating];

        }

        ((OrderListCell *) cell).delegate = self;
        [((OrderListCell *) cell) prepareOrderListCell:[self.objectIdArray objectAtIndex:indexPath.row]];

        return cell;

    }

ログに 7 が 6 回 (!) 書き込まれました。解決策はありますか?

4

3 に答える 3