UIPopoverController is not running under iPhone

135 views
Skip to first unread message

4ila...@gmail.com

unread,
Nov 8, 2013, 6:56:02 AM11/8/13
to rob...@googlegroups.com

I try to open Photo Library with the help of UIPopoverController. But UIPopoverController is not supported by iPhone. How to make following code workable on iPhone? (I.e. what is another approach?) 

final CGRect bounds = UIScreen.getMainScreen().getBounds();

UIViewController controller = app.getUIViewController();

UIImagePickerController imagePicker = new UIImagePickerController();

final UIPopoverController popoverController = new UIPopoverController(imagePicker);

imagePicker.setSourceType(UIImagePickerControllerSourceType.PhotoLibrary);

imagePicker.addStrongRef(popoverController);

popoverController.presentFromRectInView(new CGRect(x, y, viewWidth, viewHeight), controller.getView(), UIPopoverArrowDirection.Right, true);

popoverController.setPopoverContentSize(new CGSize(viewWidth, viewHeight), true);


Niklas Therning

unread,
Nov 11, 2013, 3:14:01 AM11/11/13
to 4ila...@gmail.com, rob...@googlegroups.com
Popovers are not allowed on iPhones. There's a workaround described here: http://stackoverflow.com/questions/14787765/uipopovercontroller-for-iphone-not-working. You could do this with RoboVM too I think though you would have to compile that ObjC code into an object file (.o) using Xcode and then link it in with your RoboVM app. 


--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages