Is there an existing API for this kind of separated controls for the UINavigationbar seen in Mail.app? More specifically this up and down arrows shown in the picture.
+3
A:
Note that you can create UIBarButtonItem
with any custom view you want. So you can create it with UISegmentedControl as well - it is what's likely used in your example. Workflow should be something like:
- Create momentary (
momentary
property set to yes) UISegmentedControl with 2 segments - Assign an image to each of them (using
setImage:forSegmentAtIndex:
method). Then - Create
UIBarButtonItem
initialized with this UISegmentedControl as a custom view (usinginitWithCustomView:
method). - Add your UIBarButtonItem as a left or right BarButtonItem to the UINavigationItem
Vladimir
2010-05-23 15:13:52
Looks great, I'm trying this - thank you
hecta
2010-05-23 15:27:36