I want the regular button shape around my square image, so I went for initWithImage:Style:Target:Action. The problem is, it then stretches my image to fit a wide button, and this isn’t what i want at all. How do i make it put my image there without stretching? And how would i change the rectangle width too?
Share
I’m not sure if you can add an image onto a bar button so it looks outlined. I do know that you can add you own custom view fairly easily that doesn’t stretch the image. Basically, all you have to do is create an imageView initialized with your image, then create a bar button item and add the custom view to it.
Then you just have to set the button where you want it. Again, this won’t give you a button background, so it might be best to create an image with a button background (possibly photoshop your existing image on a button, then save that new image and use that one)