如何将以下代码转换为Swift 3
:
let size = text.boundingRectWithSize(CGSizeMake(view.frame.width - 26, 2000), options: NSStringDrawingOptions.UsesFontLeading.union(.UsesLineFragmentOrigin), context: nil).size
答案 0 :(得分:2)
这有用吗?
let size = text.boundingRect(with: CGSize(width: view.frame.width - 26, height: 2000), options: NSStringDrawingOptions.usesFontLeading.union(.usesLineFragmentOrigin), context: nil).size