I need to create a CGSize to compute text height of an arbitrary text with arbitrary length. UIKit has this nice method -sizeWithFont:constrainedToSize: and my text is only cons
For those using Swift 2, you should use:
CGFloat.max
For those using Swift 3, you should use:
CGFloat.greatestFiniteMagnitude
Note that CGFloat.max was removed when Swift 3 came out, as reflected in the documentation.