Compose UIBarButtonItem changes position slightly when coming into view

后端 未结 7 2041
星月不相逢
星月不相逢 2021-02-13 15:21

When presenting a new view with a UIBarButtonSystemItemCompose button in the navigation bar, the position is slightly off and adjusts after the view has come into view.

相关标签:
7条回答
  • 2021-02-13 16:16

    A simple workaround:

    let composeButton = UIBarButtonItem(image: UIImage(named: "UIButtonBarCompose"), style: .Plain, target: self, action: "compose:")
    self.navigationItem.rightBarButtonItem = composeButton
    

    We can get the image 'UIButtonBarCompose' with iOS-Artwork-Extractor.

    0 讨论(0)
提交回复
热议问题