Swift 测量字符串大小 夏洛特烦恼 2021-08-15 331 阅读1分钟 测量宽度的示例 let tips = "Make this day great!" let textWidth = tips.size(withAttributes: [.font: UIFont.systemFont(ofSize: 11)]).width