您可以使用 UIToolbar 来完成。您必须首先隐藏导航栏并在视图顶部放置一个 UiToolbar。
现在您可以根据需要添加为按钮。
UIToolbar *tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 20, 1036, 42)];
tools.barStyle = UIBarStyleBlackTranslucent;
NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:3];
UIBarButtonItem * backButton = [[UIBarButtonItem alloc] initWithCustomView:myCustomView];
[buttons addObject:backButton];
//you can add also a spacer
UIBarButtonItem *spacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
[buttons addObject:spacer];
UIBarButtonItem * homeButton = [[UIBarButtonItem alloc] initWithCustomView:myCustomView];
[buttons addObject:homeButton];
[tools setItems:buttons animated:NO];