how to set scrollview content size in swift 3.0 [duplicate]
问题 This question already has answers here : CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift (10 answers) Closed 3 years ago . 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) 回答1: From Swift 3 CGSizeMake is not available use CGSize init instead. scrollView.contentSize = CGSize(width: self.view.frame.size.width