Note that there are some explanatory texts on larger screens.

plurals
  1. POiPad running iPhone app stops responding when UIImagePickerController is closed (using cocos2d)
    primarykey
    data
    text
    <p>Okay, so I'm a little confused about how to use the ipad image picker. I have 2 apps. One is an HD version built just for ipads. The other is a regular version built for iPhones (which have to be compatible with iPads). The iPad works fine when using the HD version and the iPhone works fine when using the non-HD version. However, when I'm using the iPad with the non-HD version, the camera roll pops up just like it should, but my scene stops responding. It's almost like the scene is paused or something.</p> <p>First, I call the picker in an in-app purchase method...</p> <pre><code>UIImagePickerController *picker = [[UIImagePickerController alloc]init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.wantsFullScreenLayout = YES; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { NSLog(@"UIUserInterfaceIdiomPad-Does not get called in non-HD version"); _popover = [[NSClassFromString(@"UIPopoverController") alloc] initWithContentViewController:picker]; [_popover setDelegate:self]; CGSize winsize = [[CCDirector sharedDirector] winSize]; [_popover setPopoverContentSize:CGSizeMake(winsize.width,winsize.height) animated:NO]; [_popover presentPopoverFromRect:CGRectMake(0,0,10,10) inView:[[CCDirector sharedDirector]openGLView] permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; } else { NSLog(@"iPhone"); AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; RootViewController *vc = delegate.viewController; [vc presentViewController:picker animated:YES completion:^{ }]; [[[CCDirector sharedDirector] openGLView] addSubview:picker.view]; } </code></pre> <p>I check to see if the device is an iPad or an iPhone. If the device is an iPad, I use the popover method to show the camera roll. Then I close the picker with...</p> <p>-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{</p> <pre><code>CGSize winSize = [[CCDirector sharedDirector] winSize]; // newImage is a UIImage do not try to use a UIImageView newImage = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; newCenterpiece= [info objectForKey:@"UIImagePickerControllerOriginalImage"]; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { NSLog(@"UIUserInterfaceIdiomPad--Does not get called in non-HD version"); [_popover dismissPopoverAnimated:YES]; } else { // Dismiss UIImagePickerController and release it NSLog(@"[picker dismissViewControllerAnimated:YES completion:^{}];)"); [picker dismissViewControllerAnimated:YES completion:^{ }]; [picker.view removeFromSuperview]; } [[CCDirector sharedDirector] startAnimation]; [[CCDirector sharedDirector] resume];... </code></pre> <p>I added the startAnimation and resume lines just to see if that was causing my issues, but that doesn't appear to be the case. After the picker closes, the scene just sits there. What am I doing wrong? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload