UIEdgeInsetsMake available in Swift 3

CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is not available in Swift3. but UIEdgeInsetsMake, NSMakeRange, etc. available in Swift3. Why didn’t Apple delete them?

+4
source share
1 answer

They are not deleted. They are renamed. Now you use the initializer syntax instead of the factory method:

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

And constants are now a static property of type

UIEdgeInsets.zero 
+8
source

Source: https://habr.com/ru/post/1659316/


All Articles