自定义UIBarButtonItem右边的视图
UIButton *refreshButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 60, 35)]; [refreshButton setBackgroundImage:[UIImage imageNamed:@"cancel_btn.png"] forState:UIControlStateNormal]; [refreshButton addTarget:self action:@selector(updatePictureNews:) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:refreshButton]; self.navigationItem.rightBarButtonItem = leftBarButtonItem;