我創建了一個應用程序來使用URL查看一些數據。我使用了asynctask
來防止主線程阻塞。但是在加載頁面之後,我需要向下滾動並查看可見的圖像。但它不顯示每個圖像。這是我的代碼。需要滾動才能看到ios中的表格單元格中的圖像
viewDidLoad方法
的cellForRowAtIndexPath方法
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"SettingsCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell=[[UITableViewCell alloc]initWithStyle:
UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
Lawyer *l = [[Lawyer alloc]init];
l = [_myObject objectAtIndex:indexPath.row];
cell.textLabel.text = [NSString stringWithFormat:@"%@" "%@",l.firstName,l.lastName];
cell.detailTextLabel.text = l.state;
cell.imageView.image = l.uiImage;
return cell;
}
我該如何解決這個問題。
在此先感謝!