iOS UIImageView 调整大小问题

标签 ios uiimageview interface-builder autolayout

我发现 UIImageView 有一些奇怪的行为。我在 IB 中布局 imageView,使其占据整个 View Controller 的 View 。调整大小设置为缩放以填充。但我仍然看到图像周围有一些边框。我将 imageView 的背景颜色更改为浅蓝色,这样更容易看到问题。不确定是什么导致了这种行为。为什么图像没有占据所有空间?

enter image description here

最佳答案

检查“Constrain to margins”是否被禁用。

enter image description here

关于iOS UIImageView 调整大小问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29649788/

相关文章:

ios - 提交到应用商店时出现 UIRequiredDeviceCapabilities 错误

iphone - 适用于 iOS 的 Google Drive 与 Google Doc?

ios - 在没有 masksToBounds 的情况下使 View 成为圆形

ios - 如何使 UIImageView 出现在 MapView 上方

iphone - 在 UIImageView 上绘画具有更好的性能

ios - 从 UIController 调用 UIView

cocoa-touch - 在 UITableViewCell 中使用渐变作为背景

ios - 如何创建滚动静态图像的简单 ScrollView ?

macos - 使用组合标题栏 + 工具栏,同时保持标题可见性

cocoa - 通过 socket 将数组 Controller 链接到 XCode 中的数组