UIImagePicker 过渡到 modalViewController
从 UIImagePicker 选择图像后,我想转换(crossFade)到 imagePicker 后面呈现的模态视图控制器。
我遇到的问题是动画从一个模式(UIImagePicker)窗口到另一个模式窗口的转换。如果我关闭 imagePicker 并呈现新模式,它们都会消失。如果在关闭 imagePicker 和呈现新模式之间存在延迟,它在功能上可以工作,但不能提供平滑的过渡。
如何实现从一种模式到下一种模式的平稳过渡?
After selecting an image from the UIImagePicker, I'd like to transition (crossFade) to a modal viewController that is presented behind the imagePicker.
The problem I'm having is animating a transition from one modal (UIImagePicker) window to another modal window. If I dismiss the imagePicker and present the new modal they both disappear. If there is a delay between the dismissing the imagePicker and presenting of the new modal, it functionally works, but it doesn't provide a smooth transition.
How can I accomplish a smooth transition from one modal to the next?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好像没有直接的方法。我认为解决方法是这样的:
您可以从 TargetViewController 中呈现 UIImagePickerController(您希望在关闭 UIImagePickerController 后呈现),并隐藏其视图之一(图像视图)。在 UIImagePickerController 委托中,您可以设置所需的图像并使其在 TargetViewController 中可见。关闭 UIImagePickerController 后,您将获得所需的转换。
There seems to be no direct method. Work around I think is like this:
You can present the UIImagePickerController from your TargetViewController(that you want to present after dismissing be UIImagePickerController) with one of its view hidden (Image View). In the UIImagePickerController delegate, you can set the required image and make it visible in the TargetViewController. After dismissing the UIImagePickerController, you will get the required transition.