iOS 9 Swift UIView没有成员
iOS 9 Swift UIView has no member
我使用了 swift 自动布局。
这是代码
overlayView.setTranslatesAutoresizingMaskIntoConstraints(false)
这在 iOS 8 中完美运行。但在 xcode 7 中它不起作用。它给出了错误
Value of type 'UIView' has no member setTranslatesAutoresizingMaskIntoConstraints
现在好像是:
view.translatesAutoresizingMaskIntoConstraints = false
我认为他们将其更改为更符合 Swift in Swift 2
中属性的一般模式
我使用了 swift 自动布局。
这是代码
overlayView.setTranslatesAutoresizingMaskIntoConstraints(false)
这在 iOS 8 中完美运行。但在 xcode 7 中它不起作用。它给出了错误
Value of type 'UIView' has no member setTranslatesAutoresizingMaskIntoConstraints
现在好像是:
view.translatesAutoresizingMaskIntoConstraints = false
我认为他们将其更改为更符合 Swift in Swift 2
中属性的一般模式