拍完照片后,我尝试了 imageOrientation 属性,这很有趣,因为我的方向值搞砸了。上为左,下为右,左为下,右为上,例如,如果我握住 iPhone“上”(正常位置),则 imageOrientation 为“UIImageOrientationRight”。
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo {
switch (image.imageOrientation) {
case UIImageOrientationUp: //Left
break;
case UIImageOrientationDown: //Right
break;
case UIImageOrientationLeft: //Down
break;
case UIImageOrientationRight: //Up
break;
default:
break;
}
}
目前我正在使用针对 iOS 3.1 的 4.1 SDK GM (xcode_3.2.4_and_ios_sdk_4.1_gm_seed)