4
votes

When segueing from one view with a standard Nav Bar Button Item of type "Compose" to another view with the same Nav Bar Button, the icon shifts a few pixels to the right.

Here is what it looks like:

enter image description here

If I change the Nav Bar Button Item to a different type, such as "Add", this odd behavior is not observed. I've also tried changing the Bar Item Image Offsets and the Bar Button Item Width. Neither of those solved the issue.

There's really nothing complex about my setup. I just dragged the Bar Button Item from the object library into the Nav bar and changed Identifier to "Compose" for both view controllers. That's it.

Does anyone know how to get around this?

EDIT

This appears to be a bug in iOS. I've seen this same issue in various apps.

1
I think it might be adjusting for your text.Petri
I removed the nav bar text on all the view controllers, and it still moves about on segue.Albert Bori

1 Answers

4
votes

We're having the same issue. It seems like a bug in iOS.

Workaround: Use a custom bar button item with your own "compose" image.

In order to use the very same image as the system compose icon, you can use iOS Artwork Extractor: https://github.com/0xced/iOS-Artwork-Extractor