Use this as a utility method to add left bar button for any of your view. Make obvious changes to get a right bar button.
+(void)setMenuButton:(UIViewController *)viewController
{
UIImage *listIcon= [UIImage imageNamed:@"YourImageName"];
UIButton *rightBarButton = [UIButton buttonWithType: UIButtonTypeCustom];
[rightBarButton setBackgroundImage: listIcon forState:UIControlStateNormal];
[rightBarButton addTarget: viewController.navigationController.parentViewController action:@selector(barButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
rightBarButton.frame = CGRectMake(0, 0, 40, 30);
rightBarButton.tag = BAR_BUTTON_TAG;
viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView: rightBarButton];
}
Hope that helps you.