logo

While beginning with Swift 3, most of the syntax changes will be taken care by auto-complete, but there are few cases where even auto-complete won’t help. This blog is a collection of changes in Swift 3 that are hard to spot even with auto-complete.


CGRectMake

The CGRectMake macro is no more available in Swift3. So, what if you want to create a CGRect? Use CGRect.init() instead.


 UIRectEdgeNone

UIRectEdgeNone is no more available in Swift 3. So what if you want to set edgesForExtendedLayout for a ViewController to UIRectEdgeNone? You use UIRectEdge(rawValue: 0). 


 

AUTHOR: Priyank Tiwari
1 Comment
  • Swift optimizes code to call direct memory addresses instead of looking up the method location at runtime as in Objective-C.

    October 6, 2017

Leave a Comment

Your email address will not be published.