奇怪的UIImage问题 [英] Strange UIImage problem

查看:57
本文介绍了奇怪的UIImage问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序从UIImagePicker提取图像并显示它,但是在uiscrollview中滚动浏览图像几次后,大多数情况下无法显示图像,而应将其替换为空白点.之后,各种ui元素可能会消失,例如其他uiimage,以及手机锁定屏幕上直到应用关闭的时间.

My app takes an image from UIImagePicker and displays it but after scrolling through the images in a uiscrollview a few times, an image can mostly not be displayed, replaced with blank spots where it should be instead. After that various ui elements can disappear, for example other uiimages, and the time on the phone lock screen until the app's closed.

我不确定如何很好地描述它,也许它会和某人敲响钟声.仅当将uiimages添加到子视图时,这种情况才会发生.

I'm unsure how to describe this to well, maybe it'll ring a bell with someone. It only happens when the uiimages are added to subview.

推荐答案

我遇到了同样的问题,花了我一些时间来解决.但是实际答案很简单.查看"大小检查器",然后为" UIImageView "检查"自动调整大小".使用滚动后,它会更改 UIImageView 的放置方式和大小.

I had the same problem and took me some times to figure it out. But the actual answer is pretty easy. Look at the "size inspector" and check "autoresizing" for your UIImageView. It changes the way your UIImageView is positioned and sized after you use a scroll.

这篇关于奇怪的UIImage问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆