Guten Morgen,
als seit iOS 8 der Aufruf der Kamerafunktion in meiner App nicht mehr ging suchte ich nach alternativen.
Die Alternative funktioniert soweit auch gut, jedoch nur auf dem iPad, die iPhone Version stürzt nach wie vor ab.
Alles anzeigen
Das Sagt der Debugger:
Heißt das, die Orientation muss geändert werden für die Kamera? (App läuft nur im Querformat)
Wenn ja, wie änder ich das nur für die Kamera?
Gruß
Peter
als seit iOS 8 der Aufruf der Kamerafunktion in meiner App nicht mehr ging suchte ich nach alternativen.
Die Alternative funktioniert soweit auch gut, jedoch nur auf dem iPad, die iPhone Version stürzt nach wie vor ab.
Quellcode
- -(IBAction)takephoto:(id)sender{
- /* picker1 = [[UIImagePickerController alloc] init];
- picker1.delegate = self;
- //[picker1 setSourceType:UIImagePickerControllerSourceTypeCamera];
- picker1.sourceType = UIImagePickerControllerCameraCaptureModePhoto;
- // picker1.sourceType = UIImagePickerControllerSourceTypeCamera;
- if([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0)
- {
- [[NSOperationQueue mainQueue] addOperationWithBlock:^{
- [self presentViewController:picker1 animated:YES completion:NULL];
- }];
- }else {
- [self presentViewController:picker1 animated:YES completion:NULL];
- }*/
- //Test
- if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == YES) {
- picker1 = [[UIImagePickerController alloc] init];
- picker1.sourceType = UIImagePickerControllerSourceTypeCamera;
- picker1.delegate = self;
- picker1.showsCameraControls = YES;
- [self presentViewController:picker1 animated:NO completion:nil];
- }
- }
Das Sagt der Debugger:
2014-11-28 09:47:10.571 HammelApp Lite[1070:513959] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
2014-11-28 09:47:10.578 HammelApp Lite[1070:513959] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PLUICameraViewController shouldAutorotate] is returning YES'
*** First throw call stack:
(0x187c5e59c 0x19836c0e4 0x187c5e4dc 0x18c484710 0x18c48c810 0x18c48c7b0 0x18c48b6fc 0x18c40cea0 0x18c40cc2c 0x18c40cc2c 0x18c40cc2c 0x18c40c2fc 0x18c40c1dc 0x18c417cbc 0x18c4450a0 0x18c45ccf0 0x18c503060 0x18c70e084 0x18c492e80 0x18c404794 0x187c16a50 0x187c139dc 0x187c13dbc 0x187b410a4 0x190ceb5a4 0x18c4763c0 0x1001082f4 0x1989daa08)
libc++abi.dylib: terminating with uncaught exception of type NSException
Heißt das, die Orientation muss geändert werden für die Kamera? (App läuft nur im Querformat)
Wenn ja, wie änder ich das nur für die Kamera?
Gruß
Peter
Intelligente Sätze zu verfassen ist gar nicht so einfach. Schon ein einziger Buchstabendreher kann den ganzen Text urinieren...