18

After updated Xcode8 not able to set contentSize for ScrollView. I can't able to use CGSizeMake. Can anyone help me?

I have tried

scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 700)
0

1 Answer 1

44

From Swift 3 CGSizeMake is not available use CGSize init instead.

scrollView.contentSize = CGSize(width: self.view.frame.size.width, height: 700)

Check the Apple Documentation on Core Graphics as of from Swift 3 they have made a lot of changes.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Buddy it works
Welcome mate :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.