I am showing the code for the custom left pane of the UINavigationcontroller . You can add this code to each view controller and for both buttons (left and right)
leftButton = [UIButton buttonWithType:UIButtonTypeCustom]; [leftButton setImage:[UIImage imageNamed:@"Yourcutomeimage.png"] forState:UIControlStateNormal]; leftButton.frame = CGRectMake(0, 0, 30, 30); [leftButton addTarget:self action:@selector(youraction:) forControlEvents:UIControlEventTouchUpInside]; self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:leftButton]autorelease];
//or
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:leftButton]autorelease];
Hope this helps you.
source share