2015-09-19 25 views
6

Ho usato il layout automatico rapido.iOS 9 Swift UIView non ha membri

Questo è il codice

overlayView.setTranslatesAutoresizingMaskIntoConstraints(false) 

Lo ha funzionato perfettamente in iOS 8. Ma in xcode 7 non funziona. Si sta dando l'errore

Value of type 'UIView' has no member setTranslatesAutoresizingMaskIntoConstraints 

risposta

28

Ora sembra essere:

view.translatesAutoresizingMaskIntoConstraints = false

penso hanno cambiato per essere più coerente con il modello generale per le proprietà a Swift a Swift 2

+0

Sì. È corretto. Grazie :) – Puvanarajan