私の問題は、 デフォルトのカメラコントロールを非表示にし、自分自身でオーバーレイします。これは、cameraOverlayViewプロパティで行われます。 takePictureメソッドのトリガーに問題がありました。cameraOverlayViewで画像を取得
1
A
答えて
0
(コメントにし、編集で解決の質問Question with no answers, but issue solved in the comments (or extended in chat)を参照してください。)
OPが書いた:
をここでは解決策になるようになったものです:
私は2つのUIViewControllerを持っています。メインのViewControllerとCustomOverlay(カメラコントロール用)。
私のViewControllerは、私はソースの種類と、このようなことがありカメラ制御のためのオーバーレイ宣言:私はテイク画像ボタンを持っているし、欲しいのUIViewControllerでCustomOverlay、上の今
- (void)viewDidLoad
{
// notification from the CustomOverlay Controller that triggers the eTakePicture method
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eTakePicture:) name:@"eTakePicture" object:nil];
daysBtn.delegate = self;
daysBtn.hidden = YES;
picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
picker.showsCameraControls = NO;
picker.navigationBarHidden = YES;
picker.wantsFullScreenLayout = YES;
picker.delegate = self;
overlay = [[CustomOverlay alloc] initWithNibName:@"CustomOverlay" bundle:nil];
// Overlay for the camera controls, note the "= overlay.view", the ".view" was important
// because the overlay is a new UIViewcontroller (with xib) so you have to call the
// view. Most tutorials that I saw were based on UIView so only "= overlay" worked.
picker.cameraOverlayView = overlay.view;
[self presentModalViewController:picker animated:NO];
[super viewDidLoad];
}
を
- (IBAction)shoot:(id)control {
[[NSNotificationCenter defaultCenter] postNotificationName:@"eTakePicture" object:self];
}
:このボタンは、メインのViewControllerのメソッドをトリガーします私はそれを確認したら、上記のすべてのコードはもう少し変更します
-(void)eTakePicture:(NSNotification *)notification
{
[picker takePicture];
}
、cameraSourceTypeがある場合、私がチェックする条件を持っている必要があり、特別に第一ブロック:
とバックメインのViewControllerへ利用可能です。
誰かを助ける希望。質問があれば、ただ聞いてください。
関連する問題
- 1. jspdfで画像を取得
- 2. ワードプレス画像取得
- 3. ASP.NETストアSQLで画像を取得し、Asp用に取得:画像
- 4. アンドロイドで、カメラから取得した画像の画像IDを取得する
- 5. vibrant.js画像データを取得
- 6. Silverlight:画像サイズを取得
- 7. woocommerce画像サイズを取得
- 8. 画像サイズを取得2008
- 9. 取得日画像の取得
- 10. iosで画像からテキストを取得する(画像処理)
- 11. TCPDFエラー:[画像]画像のサイズを取得できません
- 12. Angular Swiperで画像とキャプションを取得
- 13. javascript/jqueryで画像のフルサイズを取得
- 14. jsoupで画像のURLを取得
- 15. ウェブアプリケーションでスキャナから画像を取得
- 16. Carrierwave urlで画像を取得
- 17. facebook api画像でフィードを取得
- 18. PythonでBase64の画像サイズを取得
- 19. クロッピングで新しい画像を取得
- 20. Androidで画像ソースを取得
- 21. URIでウェブから画像を取得
- 22. PHPで画像オブジェクトのコンテンツを取得
- 23. 相対パスで画像を取得
- 24. Alamofireリクエストで画像データを取得
- 25. アセットAndroidで寸法画像を取得
- 26. Pythonで画像の値を取得
- 27. MATLABで画像の一部を取得
- 28. 入力フィールドから画像を取得して画像データを取得する/画像を表示
- 29. 外部URL取得画像
- 30. GoogleコンタクトAPI - 画像取得
ただ試してみてください。もしあなたが具体的な問題に遭遇すれば、ここに戻ってください。 – mvds
http://jcuz.wordpress.com/2010/02/17/pickerfocus/ – Sharme
[UIImagePickerController:デフォルトのコントロールの上にカスタムカメラのオーバーレイが表示されますか?](http://stackoverflow.com/questions/5251336/) uiimagepickercontroller-custom-camera-overlay-on-default-control-on-default-control) –