簡體   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