记录ALAssetRepresentation的维度

时间:2013-07-31 22:56:39

标签: objective-c alassetslibrary

如何记录图像的尺寸?

我的代码:

ALAssetRepresentation *asset = [alAsset defaultRepresentation];
NSLog(@"dim: %@", [asset dimensions]);

我尝试了很多变化,但仍然需要格式警告,需要CGSize(又名'struct CGSize')

1 个答案:

答案 0 :(得分:0)

ALAssetRepresentation *asset = [alAsset defaultRepresentation];
NSLog(@"dim: %@", NSStringFromCGSize([asset dimensions]));