shoheiyokoyama
shoheiyokoyama

Reputation: 51

In Swift 3, UIEdgeInsetsMake is available

CGRectMake , CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift3. but UIEdgeInsetsMake, NSMakeRange, etc available in Swift3. Why didn't Apple remove these?

Upvotes: 5

Views: 6961

Answers (1)

Josh Homann
Josh Homann

Reputation: 16327

They are not removed. They are renamed. You now use the initializer syntax instead of a factory method:

UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 0)

And the constants are now a static property of the type

UIEdgeInsets.zero 

Upvotes: 10

Related Questions