我使用 RoboVM 开发 iOS 应用程序。任务是在新窗口中打开相机或任何其他视图,然后返回上一个结果。我已经成功地尝试了 UIPopoverController,但 iPhone 成语不支持它。那么,RoboVM 中 startActivityForResult 的类比是什么?
PS。UIPopoverController 解决方案的代码
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);