开发者

iPhone - Separated UINavigation Bar Items

iPhone - Separated UINavigation Bar Items

Is there an existing API for this kind o开发者_开发知识库f separated controls for the UINavigationbar seen in Mail.app? More specifically this up and down arrows shown in the picture.


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:

  1. Create momentary (momentary property set to yes) UISegmentedControl with 2 segments
  2. Assign an image to each of them (using setImage:forSegmentAtIndex: method). Then
  3. Create UIBarButtonItem initialized with this UISegmentedControl as a custom view (using initWithCustomView: method).
  4. Add your UIBarButtonItem as a left or right BarButtonItem to the UINavigationItem
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜