[英]RightBarButton lowered in landscape-orientation in iOS 11
I have a problem with the RightBarButton within an iOS-App. 我在iOS应用程序中的RightBarButton遇到问题。 Whenever the device is rotated to landscape, that button lowers as seen in the screenshot.
只要将设备旋转到横向,该按钮就会降低,如屏幕截图所示。 While in portrait-orientation everything looks fine.
在纵向模式下,一切看起来都很好。
Any ideas? 有任何想法吗?
I still have no idea what caused the misplaced label on orientation-change, but I was able to solve it by using a custom UIButton as my UIBarButtonItem: 我仍然不知道是什么原因导致方向改变时标签放错了地方,但是我可以通过使用自定义UIButton作为我的UIBarButtonItem解决它:
let rightButton: UIButton = UIButton(type: .system)
[...]
let rightBarButtonItem: UIBarButtonItem = UIBarButtonItem(customView: rightButton)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.