Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-17-2012, 05:17 AM   #1 (permalink)
CPV
Registered Member
 
Join Date: Oct 2010
Posts: 14
CPV is on a distinguished road
Default iOS5 camera and camera roll issues when selecting/using image (works in iOS 4.x.x)

Hi all!

Two issues are showing up now that I want to update my app that previously worked fine in iOS4-. Previous version of app downloaded from app store running on my iOS5.0.1 phone works though and I did not update any of the code around the camera functions.

1. Camera - after user takes a picture, you get the standard "Retake" or "Use" buttons. Retake is fine but "Use" causes the app to freeze and crash.

2. Camera Roll - after user chooses image from camera roll, nothing appears to happen. It actually did select though -- but now you have to click "Cancel" and the image appears in the main window.

In both cases, no error messages in the debugging window so not sure what happened. Code for the two functions in question:

Code:
        //Camera Method//////////////////////////
        - (IBAction) cameraDeviceAction {
	if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == YES) {
		imgPicker = [[UIImagePickerController alloc] init];
		
		imgPicker.sourceType =  UIImagePickerControllerSourceTypeCamera;
		
		imgPicker.delegate = self;
		
		imgPicker.allowsImageEditing = NO;

				
		if([ApplicationUtils getSystemVersionAsAnInteger] >= __IPHONE_3_1) {
			if(cameraOverlayView == nil) {
				cameraOverlayView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"photo_guideline_640x960.png"]];	
				cameraOverlayView.frame = CGRectMake(0, 0, 320, 431);
			}
			imgPicker.cameraOverlayView = cameraOverlayView;
		}
		
		[self presentModalViewController:imgPicker animated:YES];
	}
        }

        - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
	[self showBackdropScreen:[info objectForKey:@"UIImagePickerControllerOriginalImage"]];
        }


        //Photo Library Method //////////////////////////
        - (IBAction) libraryAction {
	imgPicker = [[UIImagePickerController alloc] init];
	imgPicker.allowsImageEditing = NO;
	imgPicker.delegate = self;
	
	[self presentModalViewController:imgPicker animated:YES];
        }

        - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
	[self showBackdropScreen : img];
        }
I think the errors are in this section, but please let me know what you think or if you need more of the file.

Thanks much!
CPV is offline   Reply With Quote
Old 04-04-2012, 06:13 PM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 2
adamj is on a distinguished road
Default So, I'm talking to apple currently...but...

...the suggestion I'm getting so far from them is that UIImagePickerController.cameraOverlayView has changed from being something you assign, to something you use (i.e. it exists already)

So it should always be [picker.cameraOverlayView addSubview:myView]

not picker.cameraOverlayView = myView

However I just sent them another test project that shows that, in a newly created controller, cameraOverlayView is in fact null, so can't be assigned to

I'll post a response when I get it...it seems there are differences in how the overlay view works in iOS 5
adamj is offline   Reply With Quote
Reply

Bookmarks

Tags
camera, ios, ios 5

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 395
10 members and 385 guests
7twenty7, Atatator, glenn_sayers, guusleijsten, iphonedevshani, QuantumDoja, sacha1996, Sami Gh, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:43 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0