2012-05-30 5 views
1

Je veux ouvrir vue Cameraoverlay en mode paysage que ... Mais ce code me donne BAD_Excess ..L'orientation est uniquement en mode paysage en mode cameraoverlay

{  
self.imagePickerController = [[[UIImagePickerController alloc] init ] autorelease]; 
imagePickerController.view.frame=CGRectMake(0, 0, 1024, 768); 
self.imagePickerController.delegate = self; 
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; 

//Set Notifications so that when user rotates phone, the orientation is reset to landscape. 
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; 

//Refer to the method didRotate: 
[[NSNotificationCenter defaultCenter] addObserver:self 
             selector:@selector(didRotate:) 
              name:@"UIDeviceOrientationDidChangeNotification" object:nil]; 

//Set the picker source as the camera 
self.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; 

//Bring in the picker view 
[self presentModalViewController:self.imagePickerController animated:YES]; 
} 

s'il vous plaît résoudre ce problème ... merci En Advance

+0

Où se passe le mauvais accès –

+0

[[UIDevice currentDevice] setOrientation: UIInterfaceOrientationLandscapeRight]; dans didRotate: méthode que j'ai utilisé ce code –

+0

Salut Tejas, Si vous trouvez une solution pour cela, puis partager ceci j'ai le même problème à traiter. Merci. – iBhavik

Répondre

0

aller au produit> modifier Schems> activer zombie

cela vous donnera une description plus à votre exception.

+0

J'ai fait cette chose ... cela ne montre rien dans les schémas d'édition –

+0

peut-être que vous n'avez pas changé l'onglet. choisi l'onglet de diagnostic ci-dessus, il y a une case à cocher – Saad

Questions connexes