【Swift4】CGRect、CGSieze、CGPointの指定のしかたと違い【Objective-C】【iOS11】
SwiftとObjective-CのCGRect、CGSize、CGPointの指定の方法です。
CGRect、CGRectMake
Swift4.0
view.frame = CGRect(x : 0, y : 0, width : 100, height : 100)
Objective-C
view.frame = CGRectMake(0, 0, 100, 100)
CGSize、CGSizeMake
Swift4.0
scrollView.contentSize = CGSize(width:100, height:100)
Objective-C
scrollView.contentSize = CGSizeMake(100, 100)
CGPoint、CGPointMake
Swift4.0
view.center = CGPoint(x:100, y:100)
Objective-C
view.center = CGPintMake(0, 0)