Try this if your are using a UINavigationController
- change the background image of your navigation bar with
[self.navigationController.navigationBar setBackgroundImageForBarMetrics:]
- set your left and right buttons with
[self.navigationItem setLeftBarButtonItem:]
and [self.navigationItem setRightBarButtonItem:]
. You will probably have to use UIBarButtonItem's with a UIButton as a custom view here to get rid of the border.
- set the three buttons in the middle like this
(you probably have to change the dimensions)
UIView *buttonView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 180, 40)];
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
button1.imageView.image = [UIImage imageNamed:@"button1.png"];
button1.frame = CGRectMake(0, 0, 40, 40);
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
button2.imageView.image = [UIImage imageNamed:@"button2.png"];
button2.frame = CGRectMake(70, 0, 40, 40);
UIButton *button3 = [UIButton buttonWithType:UIButtonTypeCustom];
button3.imageView.image = [UIImage imageNamed:@"button3.png"];
button3.frame = CGRectMake(140, 0, 40, 40);
[buttonView addSubview:button1];
[buttonView addSubview:button2];
[buttonView addSubview:button3];
self.navigationItem.titleView = buttonView;