自定义导航栏上的按钮
1、在导航栏左边自定义一个按钮 UIButton *leftButton = [[UIButton alloc] initWithFrame:CGRectMake(15, 15, 40, 40)]; leftButton.titleLabel.font = [UIFont systemFontOfSize:14]; [leftButton setTitleColor:UIColorFromRGB(0x19191a) forState:UIControlStateNormal]; [leftButton setTitle:@"账单" forState:UIControlStateNormal]; [leftButton addTarget:self action:@selector(didList:) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *leftBarButtonItems = [[UIBarButtonItem alloc] initWithCustomView:leftButton]; UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem