UIImagePickerController のように、モーダル ビューを表示できるオブジェクトを作成したいと考えています。UIImagePickerController を使用して、オブジェクトを作成し、構成してから、モーダルに表示します。お気に入り:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
//Configure the UIImagePickerController
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.mediaTypes = [[NSArray alloc] initWithObjects: @"public.movie", nil];
imagePicker.videoQuality = UIImagePickerControllerQualityTypeMedium;
imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;
//Present the Controller
[self presentModalViewController:imagePicker animated:YES];
私も同じことをしたいです。インスタンス化、構成、および提示できるコントローラーが必要です。私はそれをどのように進めるかについて混乱しています。標準の UIViewControler を使用しますか (UIImagePickerController ヘッダーを調べると、Apple が UINavigationController を使用していることがわかります)。ビューをこのコントローラーに接続するにはどうすればよいですか? それはストーリーボードですか、それとも単なるxibファイルですか。オブジェクトは他のプロジェクトで再利用するのに役立つ可能性があるため、この方法でコントローラーを構築したいので、構成方法に関するドキュメントを使用して他のプロジェクトに送信できるようにしたいので、プラグインするだけで機能します(基本的なオブジェクト指向)。これを行う方法に関する基本的なガイドはありますか?
読んでくれてありがとう。