【问题标题】:iOS 9 Swift UIView has no memberiOS 9 Swift UIView 没有成员
【发布时间】:2015-09-19 11:21:11
【问题描述】:

我使用了快速自动布局。

这是代码

overlayView.setTranslatesAutoresizingMaskIntoConstraints(false)

这在 iOS 8 中完美运行。但在 xcode 7 中它不起作用。它给出了错误

Value of type 'UIView' has no member setTranslatesAutoresizingMaskIntoConstraints

【问题讨论】:

    标签: ios swift ios9 xcode7


    【解决方案1】:

    现在看来是:

    view.translatesAutoresizingMaskIntoConstraints = false

    我认为他们将其更改为更符合 Swift 2 中 Swift 属性的一般模式

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-18
      相关资源
      最近更新 更多