CGSize sizeWithAttributes in Swift
what I did is something like this: swift 5.x let myString = “Some text is just here…” let size: CGSize = myString.size(withAttributes: [.font: UIFont.systemFont(ofSize: 14)]) swift 4.x let myString = “Some text is just here…” let size: CGSize = myString.size(withAttributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 14)]) swift 3 var originalString: String = “Some text is just here…” let … Read more