我在 iPhone 中制作了简单的相机应用程序。在 iPhone 4 中,它适用于适当的相机屏幕尺寸,但在 iPhone5 中,它在相机屏幕和底部栏之间出现黑条。
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))
{
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:
[[NSBundle mainBundle] pathForResource:@"tick"
ofType:@"aiff"]],
&_tickSound);
self.imgPickController = [[[UIImagePickerController alloc] init] autorelease];
self.imgPickController.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imgPickController.delegate = self;
self.imgPickController.showsCameraControls = NO;
posCaptDevice = UIImagePickerControllerCameraDeviceRear;
nCountSec = 0;
self.view.frame = [UIScreen mainScreen].bounds;
[self initCamera];
}
return self;
}