フルスクリーンカメラを開いたままにして、ボタンを追加する必要があるアプリを開発しています(右下)。グーグルで検索しましたが、健全な解決策が見つかりませんでした。前もって感謝します。良い一日を過ごしてください。 編集済み
- (void) showCameraUI {
[self startCameraControllerFromViewController: self
usingDelegate: self];
}
- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller
usingDelegate: (id <UIImagePickerControllerDelegate,
UINavigationControllerDelegate>) delegate {
if (([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeCamera] == NO)
|| (delegate == nil)
|| (controller == nil))
return NO;
NSLog(@"Start Camera Controller method...");
UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
// Displays a control that allows the user to choose picture or
// movie capture, if both are available:
cameraUI.mediaTypes =
[UIImagePickerController availableMediaTypesForSourceType:
UIImagePickerControllerSourceTypeCamera];
// Hides the controls for moving & scaling pictures, or for
// trimming movies. To instead show the controls, use YES.
cameraUI.allowsEditing = NO;
cameraUI.delegate = delegate;
[controller presentModalViewController: cameraUI animated: YES];
return YES;
}
PS:UINavigationControllerDelegate,UIImagePickerControllerDelegate
ヘッダーファイルにプロトコルとして追加しましたが、まだカメラが開いておらず、プロジェクトのデフォルトビューが表示されます。