我正在创建简单的自定义相机应用程序。所以。我试图自定义闪光灯设置按钮和捕捉按钮。它适用于 iPhone4 和 iPhone4s……但不幸的是……它在 iPhone3gs 上显示白屏。有什么问题?
#define CAMERA_TRANSFORM_X 1
#define CAMERA_TRANSFORM_Y 1
#define SCREEN_WIDTH 320
#define SCREEN_HEIGTH 480
- (void) showCamera
{
overlay = [[CustomOverlayView alloc]
initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGTH)];
overlay.delegate = self;
self.picker = [[UIImagePickerController alloc] init];
self.picker.delegate = self;
self.picker.navigationBarHidden = YES;
self.picker.toolbarHidden = YES;
self.picker.wantsFullScreenLayout = YES;
self.picker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.picker.showsCameraControls = NO;
self.picker.cameraViewTransform = CGAffineTransformScale(self.picker.cameraViewTransform, CAMERA_TRANSFORM_X, CAMERA_TRANSFORM_Y);
self.picker.cameraOverlayView = overlay;
[self.view addsubview self.picker.view];
}