how do I reduce the distance between the two items?
my code:
-(void)setupRightMenuButton{
filtro = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon-filtro-bar"] style:UIBarButtonItemStylePlain target:self action:@selector(buttonFilter)];
busca = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon-busca"] style:UIBarButtonItemStylePlain target:self action:@selector(moveToSearchView)];
filtro.tintColor = [UIColor whiteColor];
busca.tintColor = [UIColor whiteColor];
filtro.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
busca.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
[self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects:busca, filtro, nil] animated:YES];
}
My viewDidLoad:
- (void)viewDidLoad {
[super viewDidLoad];
[self setupLeftMenuButton];
[self.navigationController.navigationBar setBarTintColor: [UIColor colorWithRed:0.49 green:0.075 blue:0.082 alpha:1]]; /*#7d1315*/
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
forBarMetrics:UIBarMetricsDefault];
[self setupRightMenuButton];
self.title = @"Músicas";
}
I tried using the filtro.imageInsets = UIEdgeInsetsMake (6, 0, -6, 0);
but it did not work