AutoLayout issue with an iPad

时间:2015-09-01 22:32:51

标签: ios objective-c iphone ipad autolayout

I am using a TableView with the UIImageView and UILabel on the Table Cell. I set constraints for UIImageView as like this: enter image description here

And for the UILabel, I set constraints like this: enter image description here

All the constraints set are working properly on every iPhone model as I want but it's not working as expected on iPad. There is a gap on the right portion of the cell. I want the UILabel to be filled completely with the margin of 8 on the right side.

enter image description here

How to fix this issue? Am I doing the wrong way? Any suggestion? Thanks. :)

1 个答案:

答案 0 :(得分:0)

好像你正在使用wAny hAny size class。为图像视图和标签添加的约束看起来很好。如果在View Controller中拖动表视图,请检查表视图约束。或者你可以尝试给标签提供宽高比,也许这可以解决你的问题。

相关问题