Can I show a black style UIBarButtonItem in my view without the underneath UIToolBar?
The UIToolBar always has a kind of border thing, I want the system UIBarButtonItem in black just like a black standard cancel button, but not the UIToolBar
How can I do it?
Thanks
there is a cheeky hack that will help you with this.
you want to use a UISegmentedControl with style set to
UISegmentedControlStyleBarand only one item. You also need tosetMomentaryto yes – to make it behave like a button:This will give you a button that looks like a UIBarButtonItem that you can add to your normal view as if it were a button. You can add a target and an action as well. 🙂
This is what you get: something like this: