0
我在iPhone中製作了簡單的相機應用程序。在iPhone 4中,它適用於正確的相機屏幕尺寸,但在iPhone5中,它會出現相機屏幕和底部條之間的黑條。如何在Retina 4中設置相機的屏幕尺寸?
- (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;
}