ios - iPad 不遵守 Interface Builder 的 AutoLayout 约束

标签 ios ipad autolayout interface-builder

我在我的 iOS 应用程序中使用 AutoLayout。在 iPhone 上,UITableView 延伸到屏幕的两个边缘;然而,在 iPad 上,它会在距边缘几像素处停止。

这是我的 AutoLayout 约束:

constraints

问题截图如下: background issue

关于为什么会发生这种情况有什么想法吗?

最佳答案

尾随和前导空间为 -16.00000,通过取消选中 constraint to margin 选项将其设置为 0...因为它是 -16.000,它使边缘距离为 -16...
你应该像下图那样做......

enter image description here

它按照你的意愿将你的边缘固定到 0

关于ios - iPad 不遵守 Interface Builder 的 AutoLayout 约束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31095498/

相关文章:

objective-c - iOS 8 中 updateViewConstraints 的行为变化

iphone - 使用自动布局导致按钮停止工作

ios - 显示不同高度的 UIWebView 和 UITableView

iphone - 使用 block 从后台线程加载图像

ios - TestFlight:多种设备类型可能出现的错误

iphone - CamScanner、Genius Scan 和 JotNot 如何工作?

ios - 当 XIB 没有时,UIImageView 在模拟器中调整大小

ios - 结构数组不在闭包外更新

ios - 在 iOS5 项目中导入框架

ios - GMT 日期字符串转换为 UTC 日期