ImagePicker 处理大照片时速度缓慢
抱歉,我没有任何代码可以显示此问题。但我希望我能解释得足够好。
应该发生什么。
用户点击按钮:
显示图像选择器。 (当前模式视图)
用户选择照片:
图像选择器关闭(动画) 然后将所选图像加载到全局对象(单例)中 所选图像将加载到 IBOutlet UIImageView 中。在当前看来。 推送了一个新的视图控制器(动画),它显示的图像更大。
在大多数情况下,这种情况发生得很好,但如果加载的是大照片,例如 iPhone 4 相机拍摄的照片。应用程序滞后,它跳转到推送视图,没有选择器关闭和推送视图控制器的动画。
有没有办法更好地处理这个问题,以便显示动画?
使用选择器在后台执行某些任务?
非常感谢您的帮助。
汤姆.
I apologize i don't have any code to show for this problem. But i hope i can explain it well enough.
What should happend.
Users Taps a Button:
Image Picker is displayed. (present modal view)
User Chooses a photo:
the image picker dismisses (animated)
the chosen image is then loaded into a global object ( singleton)
and the chosen image is loaded into a IBOutlet UIImageView. in the current view.
A new view controller is pushed (animated ) which displays the image much larger.
For the most part this happens fine, however if a large photo, such as a photo taken by the iPhone 4 camera is loaded. the application lags and it jumps to the pushed view with no animations for the picker dismisal and the pushed viewcontroller.
is there a way to handle this better so the animations are shown?
performing certain task in the background with a selector?
Many thanks for your help.
Tom.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我唯一的解决方案是在推送下一个视图控制器之前调整图像大小!
My only solution was to resize my image before pushing the next view controller!