let textField : NSTextField = NSTextField()
textField.frame = CGRect(x: 100, y: 100, width: 100, height: 150)
textField.autoresizingMask = [.height,.width,.minXMargin, .minYMargin, .maxXMargin, .maxYMargin]
textField.attributedStringValue = NSMutableAttributedString(string: "Test")
以上是我的代码,我想根据textField框架更改来更改字体大小。