私の問題は、 デフォルトのカメラコントロールを非表示にし、自分自身でオーバーレイします。これは、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. ワードプレス画像取得
- 2. アンドロイドで、カメラから取得した画像の画像IDを取得する
- 3. ASP.NETストアSQLで画像を取得し、Asp用に取得:画像
- 4. Silverlight:画像サイズを取得
- 5. 画像サイズを取得2008
- 6. 取得日画像の取得
- 7. iosで画像からテキストを取得する(画像処理)
- 8. MATLABで画像の一部を取得
- 9. URIでウェブから画像を取得
- 10. PHPで画像オブジェクトのコンテンツを取得
- 11. ウェブアプリケーションでスキャナから画像を取得
- 12. javascript/jqueryで画像のフルサイズを取得
- 13. 入力フィールドから画像を取得して画像データを取得する/画像を表示
- 14. GoogleコンタクトAPI - 画像取得
- 15. 外部URL取得画像
- 16. 画像コントロールから画像データを取得WPF
- 17. 2D画像から3D画像を取得する
- 18. 画像ビューにある画像の名前を取得する
- 19. 元画像から円形画像を取得する
- 20. Google画像:サムネイルURLから大きな画像URLを取得
- 21. 画像の特定の部分を取得する(画像)
- 22. Rails 3.1.1画像アセットに壊れた画像を取得する
- 23. PHP:画像サイズを取得する
- 24. ファイルのクイックルックプレビュー画像を取得
- 25. Google画像を取得する方法
- 26. データベースから画像を取得する#
- 27. Drupal 7画像フィールドパスを取得
- 28. 外部URL画像を取得する
- 29. ディレクトリから画像を取得
- 30. カスタムサイズを取得するFacebookプロフィール画像
ただ試してみてください。もしあなたが具体的な問題に遭遇すれば、ここに戻ってください。 – 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) –