繁体   English   中英

UITableView导致图像放大

[英]UITableView Causing Image to Enlarge

所以我在UIViewController里面有一个UITableView 如果没有tableView,模拟器将如下所示:

在此处输入图片说明

但是,当连接表视图时,它看起来像这样:

在此处输入图片说明

错误为:

2015-03-19 02:08:56.086 CPX[55379:5813118] Warning: A long-running operation is being executed on the main thread. 
 Break on warnBlockingOperationOnMainThread() to debug.
2015-03-19 02:08:56.482 CPX[55379:5813118] Failed to set (autostart) user defined inspected property on (UIView): [<UIView 0x7f8fa8da28c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key autostart.
2015-03-19 02:08:56.483 CPX[55379:5813118] Failed to set (animation) user defined inspected property on (UIView): [<UIView 0x7f8fa8da28c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key animation.



为什么会发生这种情况,如何防止图像调整大小?

谢谢您的帮助!

我想您的自动调整大小或自动布局类在情节提要中或xib中被检查过了,这导致了问题,您可以简单地取消选中它并根据不同的iphone尺寸处理框架。

您可以使用“自动布局约束”来防止调整图像的大小,我建议,如果图像具有固定大小,只需在顶部和尾部空间添加高度和宽度,否则就必须按照相对视图添加约束,例如,如果您没有图像根据另一个视图扩展高度和宽度,然后添加相对于该视图的约束。

如果您可以显示其他视图,则我可以更具体地建议您必须添加哪些约束。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM