When do adjustsFontSizeToFitWidth or boundingRectWithSize change the context.actualScaleFactor?
问题 When does the actualScaleFactor of an NSStringDrawingContext change? The documentation says: "If you specified a custom value in the minimumScaleFactor property, when drawing is complete, this property contains the actual scale factor value that was used to draw the string." My code: myButton.titleLabel!.font = UIFont(name: "AmericanTypewriter-Bold", size: 40) myButton.titleLabel?.adjustsFontSizeToFitWidth = true myButton.setTitle("\(textString)", forState: .Normal) let attributes =