Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Swift 3, UIEdgeInsetsMake is available

Tags:

swift3

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

like image 869
shoheiyokoyama Avatar asked Oct 30 '16 08:10

shoheiyokoyama


1 Answers

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 
like image 140
Josh Homann Avatar answered Oct 28 '22 08:10

Josh Homann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!