Update CGRectMake to CGRect in Swift 3 Automatically

后端 未结 3 427
迷失自我
迷失自我 2020-12-14 13:55

Now that CGRectMake , CGPointMake, CGSizeMake, etc. has been removed in Swift 3.0, is there any way to automatically update all initializations like from CGRectMake(0,

3条回答
  •  臣服心动
    2020-12-14 14:28

    Apple actually does provide this feature. All you have to do is go to:

    Edit > Convert > To Latest Swift Syntax...

    And then follow the onscreen prompts.

    This will solve your syntax issues and you won't have to make new functions for all of the various removed functions.

提交回复
热议问题