简体   繁体   English

UITableView导致图像放大

[英]UITableView Causing Image to Enlarge

So I have a UITableView inside of a UIViewController . 所以我在UIViewController里面有一个UITableView Without the tableView, the simulator looks like this: 如果没有tableView,模拟器将如下所示:

在此处输入图片说明

However when the Table View is connected it looks like this: 但是,当连接表视图时,它看起来像这样:

在此处输入图片说明

with an error of: 错误为:

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.



Why is this happening, and how can I prevent the resizing of the image? 为什么会发生这种情况,如何防止图像调整大小?

Thankyou for your help! 谢谢您的帮助!

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

you can prevent resizing of Image using Auto-Layout Constraints, i suggest that just add height and width with top and trailing space if your image has fix size otherwise you have to add constraints as per your relative views like if you won't your image to extends height and width according to another view then add constraints relative that view. 您可以使用“自动布局约束”来防止调整图像的大小,我建议,如果图像具有固定大小,只需在顶部和尾部空间添加高度和宽度,否则就必须按照相对视图添加约束,例如,如果您没有图像根据另一个视图扩展高度和宽度,然后添加相对于该视图的约束。

if you can show your other view than i can suggest more specifically which constraints you have to add. 如果您可以显示其他视图,则我可以更具体地建议您必须添加哪些约束。

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

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