iOS 9 Swift UIView没有会员

Puv*_*jan 6 ios swift ios9 xcode7

我使用了swift自动布局.

这是代码

overlayView.setTranslatesAutoresizingMaskIntoConstraints(false)
Run Code Online (Sandbox Code Playgroud)

这在iOS 8中完美运行.但是在xcode 7中它无效.它给出了错误

Value of type 'UIView' has no member setTranslatesAutoresizingMaskIntoConstraints
Run Code Online (Sandbox Code Playgroud)

Ric*_*ley 29

它现在似乎是:

view.translatesAutoresizingMaskIntoConstraints = false

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