_newsBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_newsBtn setImage:[UIImage imageNamed:@"home_news"] forState:UIControlStateNormal];
_newsBtn.frame = CGRectMake(0, 0, 30, 30);
[_newsBtn addTarget:self action:@selector(newsbtnSysClike) forControlEvents:UIControlEventTouchUpInside];
//用于把自定义的按钮与导航条的联系起来
UIBarButtonItem *newsBtnItem = [[UIBarButtonItem alloc]initWithCustomView:_newsBtn];
self.navigationItem.leftBarButtonItem = newsBtnItem;
//解决按钮不靠左 靠右的问题.
UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
target:nil action:nil];
nagetiveSpacer.width = -10;//这个值可以根据自己需要自己调整
self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, newsBtnItem];