UILabel应用转换并设置布局约束

问题描述

我正在尝试使用此代码旋转UILabel,

self.itemlistLabel.text = "Playlist"
self.itemlistLabel.transform = CGAffineTransform(rotationAngle: -CGFloat.pi / 2)

这会旋转标签,但这并不能在视图内部正确设置标签,我为标签添加了蓝色背景色,

enter image description here

这是Xcode中设置了布局的屏幕截图,但是在应用了transform之后,它并未按预期显示。该如何解决

enter image description here

这是我要提出的最终观点,

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)