Whenever I try to set an image to a UIBarButtonItem, it gets put in the center of the bar. How can I move it to the left to use it as a menu button by setting the image of the button programmatically?
Asked
Active
Viewed 147 times
0

Eric Aya
- 69,473
- 35
- 181
- 253

Aditya Naik
- 27
- 1
- 6
2 Answers
0
Set the left bar button image via your Navigation Controller in your storyboard instead.
Click on your Navigation Controller in Storyboard and ensure Navigation Bar is selected.
Choose your image for both Back and Back mask.

Community
- 1
- 1

elarcoiris
- 1,914
- 4
- 28
- 30
0
It can be fit to left of the NavigationBar button by "decreasing the resolution of image".

Aditya Naik
- 27
- 1
- 6