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 11-25-2011, 05:27 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 27
Kaisser74 is on a distinguished road
Default [iOS 5] Problems opening camera after close it. Why?

Hello everybody.

I am making an app that uses a camera phone.

I open the camera and it runs. Then, I close it and re-open again, the camera try to open, but it crashes.

Anyway, once I open it, but then close it, the attempt to reopen and in the second attempt there a camera, ie the image that comes to simulate a protection for the lens, but ... not open the "eye" is not really open the chamber and the app crashes.

In 3 and 4 ios working properly, but ios 5, not.

Does anyone know if there is to do something special in ios 5 regarding the use of the camera?.

Thank you very much, kind regards.
Kaisser74 is offline   Reply With Quote
Old 11-25-2011, 05:33 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Post your code. And, do you get any crash log in the console or memory warnings before the crash?
baja_yu is offline   Reply With Quote
Old 11-25-2011, 05:42 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 27
Kaisser74 is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
Post your code. And, do you get any crash log in the console or memory warnings before the crash?
Hello, this is the code:

Code:
- (id)init {
	if (!(self = [super init])) return nil;

	ar_overlayView = nil;
	
	
	ar_coordinates = [[NSMutableArray alloc] init];
	ar_coordinateViews = [[NSMutableArray alloc] init];
	
	_updateTimer = nil;
	self.updateFrequency = 1 / 20.0;
	
#if !TARGET_IPHONE_SIMULATOR
	
	self.cameraController                       = [[[UIImagePickerController alloc] init] autorelease];
	self.cameraController.sourceType            = UIImagePickerControllerSourceTypeCamera;
	CGAffineTransform cameraTransform           = CGAffineTransformMakeScale(1.232, 1.232);
	self.cameraController.cameraViewTransform   = cameraTransform;  //CGAffineTransformScale(self.cameraController.cameraViewTransform, 1.23f,  1.23f);
	
	self.cameraController.showsCameraControls   = NO;
	self.cameraController.navigationBarHidden   = YES;
#endif
	self.scaleViewsBasedOnDistance              = NO;
	self.maximumScaleDistance                   = 0.0;
	self.minimumScaleFactor                     = 1.5;
	
	self.rotateViewsBasedOnPerspective          = YES;
	self.maximumRotationAngle                   = M_PI / 6.0;
	
	self.wantsFullScreenLayout = NO;
	oldHeading = 0;
	return self;
}

-(void)closeCameraView{
	[self.cameraController.view removeFromSuperview];
	[self.cameraController release];
}

All help is welcome.

Thanks.
Kaisser74 is offline   Reply With Quote
Reply

Bookmarks

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: 402
15 members and 387 guests
chiataytuday, Clouds, David-T, dedeys78, Duncan C, e2applets, EvilElf, iekei, ipodphone, leostc, LunarMoon, Murphy, sacha1996, Sami Gh, teebee74
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,912
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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