UIImagePickerController.cameraViewTransform ignores translation
My app stopped working correctly with iOS 4.3. It uses a custom camera view overlay for the UIImagePickerController. Because of the aspect ratio differences between camera and screen live view by default has a black bar at the bottom. To get rid of it I used to apply two transforms which shift the view down and scales it to full screen:
self.cameraFeed = [[UIImagePickerController alloc] init];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 25.0);
self.cameraFeed.cameraViewTransform = CGAffineTransformScale(translate, 480.0/430.0, 480.0/430.0);
With the current iOS ver开发者_运维知识库sion it seems that the translation transform doesn't do anything - I have a 25px black bar at the bottom and changing the values doesn't have any effect. However scale and rotate transforms work as expected.
Anyone has any similar problems?
You should use the video preview layer (available since 4.2 if memory serves) instead of UIImagePicker. With it you can fully customize your UI as you see fit.
精彩评论