iOS: Navigation bar with images for buttons
问题 I would like to create a NavigationBar with images as buttons on the right side of the NavigationBar. Something like below Snapshot How can I achieve this? 回答1: Hope This Helps viewController.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yourimage.png"]]; UIBarButtonItem * item = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yourimage2.jpg"]]]; viewController.navigationItem.rightBarButtonItem = item;