Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Swift 3 Annoyence 'UIScrollView' has no member 'setTranslatesAutoresizingMaskIntoConstraints'

dickthedevdickthedev Posts: 214Registered Users @ @
Hello, I am trying to revise an older Swift code. It has an UIScrollView declared and init.

private var scroller : UIScrollView!

scroller = UIScrollView()

But when came to this line scroller.setTranslatesAutoresizingMaskIntoConstraints(false)

Xcode 8.3.2 gave me this error: 'UIScrollView' has no member 'setTranslatesAutoresizingMaskIntoConstraints'
after some search, some say that setTranslatesAutoresizingMaskIntoConstraints is a property not a method in Swift 3 so I changed it to
scroller.setTranslatesAutoresizingMaskIntoConstraints = false
I still get the same error. So what is it going to be?



Sign In or Register to comment.