我正在尝试使用与后退按钮箭头相邻的图像以及一些小空间。 我使用了下面的代码,但这增加了箭头和图像之间的空间。任何人都可以告诉我如何减少这个空间。
UIButton *button1=[UIButton buttonWithType:UIButtonTypeCustom];
[button1 setFrame:CGRectMake(-10, 2.0, 200, 42.0)];
UIBarButtonItem *button = [[UIBarButtonItem alloc]initWithCustomView:button1];
button.imageInsets = UIEdgeInsetsMake(0, -100, 0, -25); //this didn't worked out as expected ...i used this for reducnig space
self.navigationItem.leftBarButtonItem = button;
//THis allows to add image / button to the right of back button
self.navigationItem.leftItemsSupplementBackButton = YES;