UIButton style when added to navigationItem.titleView
问题 I need to add a button to the UINavigationItem titleView (actually to the center of the UINavigation Bar. I've used the following code to accomplish so: UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(0, 0, 70, 30); [btn setSelected:YES]; [btn setTitle:@"list" forState:UIControlStateNormal]; And I've go the following: I need to give the same style of the "Done" button (which is UIBarButtonItem ) to the button "list"? 回答1: You can use