在iPhone中显示从ALAsset检索到的URL图像
- (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]; } //here 'asset' represents the ALAsset object asset = [assets objectAtIndex:indexPath.row]; //i am accessing the thumbnail here [cell.imageView setImage:[UIImage imageWithCGImage:[asset thumbnail]]]; [cell.textLabel setText:[NSString stringWithFormat:@"Photo %d", indexPath.row+1]]; return cell;}
有只小跳蛙
元芳怎么了