swift - 类型 'CGRect' 的值没有成员 'makeIntegralInPlace'

标签 swift swift3 cgrect

我在 Swift 3 之前就开始工作了(其中 frame 是 CGRect):

extraLightBlurView.frame.makeIntegralInPlace()

但它在 Swift 3 中返回错误 Value of type 'CGRect' has no member 'makeIntegralInPlace'。如何解决这个问题?

最佳答案

它在 Swift 3 中不可用。请改用 integral 属性:

extraLightBlurView.frame = extraLightBlurView.frame.integral

Documentation

关于swift - 类型 'CGRect' 的值没有成员 'makeIntegralInPlace',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40104465/

相关文章:

swift - 如何在 SwiftUI 中使用 AudioKit?在 View 中更改状态变量

ios - 如何更新 CABasicAnimation 的 toValue/fromValue 以使其在更改时更平滑?

ios - 将 CGPoint 从 CGRect 转换为其他 CGRect

ios - CGRect Intersects Rect 在悬停时改变图像

ios - 如何检查交叉路口按钮

ios - UITableViewCell 中突出显示链接电子邮件的 Textview 会更改 TintColor 几秒钟

ios - 解析 : deleting object value in column using Swift

swift - 在 Swift 中使用 Tab 键选择下一个 NSTextField

ios - 如何在 swift 4 中获取 ISO8601 格式?

ios - GCD 并发队列未按 FIFO 顺序启动任务