相关疑难解决方法(0)

显示从iPhone中的ALAsset检索到的URL中的图像

我正在使用ALAsset Framework访问设备照片库中的文件.

到目前为止,我可以访问缩略图并显示它.
我想在图像视图中显示实际图像,但我无法弄清楚如何执行此操作.

我尝试使用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;
}
Run Code Online (Sandbox Code Playgroud)

iphone url image

66
推荐指数
4
解决办法
8万
查看次数

iPhone - 从照片访问位置信息

在iPhone应用程序中,是否有可能从用iPhone相机拍摄的照片中提取位置信息(地理编码,我想它的名字)?

如果没有API调用,是否有任何已知的方法来解析数据字节以提取信息?我可以自己滚动的东西?

iphone cocoa-touch geocoding geolocation

9
推荐指数
1
解决办法
9186
查看次数

标签 统计

iphone ×2

cocoa-touch ×1

geocoding ×1

geolocation ×1

image ×1

url ×1