首页 热点资讯 义务教育 高等教育 出国留学 考研考公

ios开发 怎么自动计算lab le宽度

发布网友

我来回答

2个回答

热心网友

从 iphone 的 照片库中选取的图片,由于 系统不能返回其文件的具体路径,所以这时要用到 ALAssetsLibraryALAssetsLibrary* alLibrary = [[ALAssetsLibrary alloc] init]; __block float fileMB = 0.0; [alLibrary assetForURL:[info objectForKey:UIImagePickerControllerReferenceURL] resultBlock:^(ALAsset *asset) { ALAssetRepresentation *representation = [asset defaultRepresentation]; fileMB = (float)([representation size]/perMBBytes); NSLog(@"size of asset in bytes: %0.2f", fileMB); iHasAsset = 1; [alLibrary release]; } failureBlock:^(NSError *error) { iHasAsset = 2; [alLibrary release]; }];

热心网友

http://blog.csdn.net/shawuer/article/details/74331998

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com