//navigationBar通常只有左、右两个按钮,但可以
//通过添加UISegmentedControl来增加控制按钮
UINavigationBar* _navBar;
UISegmentedControl* _SegCtl;
_navBar = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 40.0f)];
[_navBar showButtonsWithLeftTitle: @"Done" rightTitle:NULL leftBack: TRUE];
[_navBar setBarStyle: 3];
[_navBar enableAnimation];
[_navBar setDelegate: self];
[_navBar showButtonsWithLeftTitle: @"Done" rightTitle:NULL leftBack: TRUE];
[_navBar setBarStyle: 3];
[_navBar enableAnimation];
[_navBar setDelegate: self];
_SegCtl = [[UISegmentedControl alloc] initWithFrame:CGRectMake(80.0f, 8.0f, 230.0f, 30.0f) withStyle:2 withItems:NULL];
[_SegCtl insertSegment:0 withTitle:@"Button one" animated:FALSE];
[_SegCtl insertSegment:1 withTitle:@"Button two" animated:FALSE];
[_SegCtl insertSegment:2 withTitle:@"Button three" animated:FALSE];
[_SegCtl setDelegate:self];
[_navBar addSubview:_SegCtl];
NSLog(@"navigation items is: %@", [_navBar navigationItems]);
[_SegCtl insertSegment:0 withTitle:@"Button one" animated:FALSE];
[_SegCtl insertSegment:1 withTitle:@"Button two" animated:FALSE];
[_SegCtl insertSegment:2 withTitle:@"Button three" animated:FALSE];
[_SegCtl setDelegate:self];
[_navBar addSubview:_SegCtl];
NSLog(@"navigation items is: %@", [_navBar navigationItems]);