I’d like to add a bar button item to my navigation bar and give it some border images that look like vertical lines (circled in red in the image below)…

The background of the barbutton item is going to clear, as I’m setting the background image of the entire navigation bar separately. The text is going to be dynamic, so I can’t bake either the text or the lines into a background image and then set that background image for the bar button item. I just need to add these vertical line images on either side of the bar button item.
Thanks so much in advance for your wisdom!
You can use a stretchable UIImage as a background for an UIButton and then init the bar button item with the UIButton as a custom view:
etc.