GCRectMake error in Swift 3 with specific code

A very general question. What exact syntax should I use instead CGRectMakewhen coding in Swift 3?

Here is the code I would like to convert from swift 2 - 3:

{let size = text.boundingRectWithSize(CGSizeMake(view.frame.width - 26, 2000), options: NSStringDrawingOptions.UsesFontLeading.union(.UsesLineFragmentOrigin), context: nil).size}

Thanks for the help!

+4
source share
1 answer

in Swift 3.0 you can use

let rect = CGRect(x: 0, y: 0, width: 50, height: 50)

https://www.raywenderlich.com/135655/whats-new-swift-3

+14
source

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


All Articles