AppOne
buzztouch Evangelist
Profile
Posts: 348
Reg: Apr 03, 2012
London
13,980
03/14/15 06:00 PM (9 years ago)

Share Score button

Hi all, Added a Share Score button to action sheet in the bt quiz plugin and played in iPhone simulator and works. But when I checked it in the iPad simulator, the button just gets rid of the action sheet! Any ideas anyone? > The Xcode output: iPad sim 2015-03-14 23:27:53.922 appname[19967:2282523] x_appDelegate: supportedInterfaceOrientationsForWindow 2015-03-14 23:27:58.092 appname[19967:2282523] Warning: Attempt to present <SZShareDialogViewController: 0x7f8e458899d0> on <BT_screen_quiz: 0x7f8e4387e800> which is already presenting (null)
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
03/15/15 08:04 PM (9 years ago)
@AppOne. I may be off base here but ... I am thinking it has to do with what controller you are calling. A UiActivityViewController is fine for iPhones, but for an iPad you need to call a popoverPresentationController.
 
AppOne
buzztouch Evangelist
Profile
Posts: 348
Reg: Apr 03, 2012
London
13,980
like
03/15/15 08:55 PM (9 years ago)
Ok thanks for the lead, looking into that - what I don't get then however, is why the other buttons all work on iPad sim e.g. Try Again, Show Reward etc??
 
AppOne
buzztouch Evangelist
Profile
Posts: 348
Reg: Apr 03, 2012
London
13,980
like
03/15/15 09:43 PM (9 years ago)
Nope, can't get it to work in iPad sim, guess I better try on a real iPad before put too much more effort into it just in case an iPad sim only bug
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
03/15/15 09:44 PM (9 years ago)
If it helps, here is my "ShareScreen" code.... - (void)didTapAction { #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) //if (NSClassFromString(@"UIActivityViewController")) { UIGraphicsBeginImageContext(self.view.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[image] applicationActivities:nil]; if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")){ activityVC.popoverPresentationController.sourceView = _imageView; } [self presentViewController:activityVC animated:YES completion:nil]; }
 
AppOne
buzztouch Evangelist
Profile
Posts: 348
Reg: Apr 03, 2012
London
13,980
like
03/17/15 04:20 PM (9 years ago)
Thanks, but must admit, this is a bit over my head :) The changes I made were just in about 3 spots in the quiz plugin and that gave a share score button on the existing action sheet / pop over... the button works on my iPhone, iPhone sims; on iPad it is there, but when you press it, it just goes back to start quiz screen/// when i have a chance i'll show the changes i made, maybe that will help.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.