私のアプリにはいくつかの UITableViews が含まれており、セルにはいくつかのビューが含まれています。セルはサーバーから画像を読み込む必要もあるため、 SDWenImageという名前のオープン ソース ツールを使用して非同期的に画像を読み込みます。
問題は、シミュレーターでは UITableView がスムーズにスクロールしますが、iOS デバイスではスムーズにスクロールしないことです。問題を解決する理由と方法を誰か教えてください。
以下は、上記の問題に関連するコードです。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";
ItemTableViewCell *cell = (ItemTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = (ItemTableViewCell *)[[[NSBundle mainBundle] loadNibNamed:@"ItemTableViewCell" owner:self options:nil] lastObject];
}
GroupBuy *groupBuy = [tableArray objectAtIndex:indexPath.row];
cell.groupBuy = groupBuy;
[cell refreshData];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
[[NSNotificationCenter defaultCenter] addObserver:cell selector:@selector(starAction:) name:@"StarAction" object:nil];
return cell;
}
どうもありがとうございました。