I'm trying to accomplish the following result:
Set the frame of my UIImagePickerController to, lets say 200 x 200,
Set my frame at the bottom-right corner (just like Facetime/Skype does)
and show the front/rear (doesn't matter) camera stream.
Here's my code, for some reason, setFrame is not working!
self.picker = [[UIImagePickerController alloc] init];
self.picker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
self.picker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
self.picker.showsCameraControls = NO;
self.picker.navigationBarHidden = YES;
self.picker.view.frame = CGRectMake(600, 400, 200, 200); // NOT WORKING !!!
self.picker.toolbarHidden = YES;
self.picker.wantsFullScreenLayout = NO;
self.picker.delegate = delegate;
[self presentViewController:self.picker animated:YES completion:nil];
I've looked at similar SO topics but they all talk about how to
set a view on top of the UIImagePickerController, not my problem at all.
I've tried adding self.picker to a custom UIView sized 200 x 200 but still
no success.
What am i doing wrong here?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…