我想旋转UIButton的标题标签(这样文本是垂直的/90度,而不旋转按钮。
myButton.titleLabel?.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
很难说,你没有提供足够的信息!
也许可以尝试调整按钮大小以适应旋转后的内容?
myButton.sizeToFit()