UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
//调整items间距
space.width = 20;
_attentionBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 40, 20)];
[_attentionBtn setTitle:@"关注" forState:UIControlStateNormal];
[_attentionBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_attentionBtn.titleLabel.font = JhFontsize(12);
[_attentionBtn.layer setCornerRadius:5]; //设置矩圆角半径
[_attentionBtn addTarget:self action:@selector(ClickAttentionBtn:) forControlEvents:UIControlEventTouchUpInside];
UIView *btnView = [[UIView alloc] initWithFrame:_attentionBtn.bounds];
[btnView addSubview:_attentionBtn];
UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithCustomView:btnView];
self.navigationItem.rightBarButtonItems = @[item1,space,item2];