我之前使用的是iOS 6.1,但现在我已经转移到iOS 7。除了其他问题之外,我还观察到在我的导航栏中,左侧栏按钮项目的左侧空间和右侧按钮栏项目的右侧空白空间相当大iOS 7 中的功能比 iOS 6 中的功能更多。
我需要知道有没有办法可以减少导航栏中左、右栏按钮项目的空白空间?
我也面临这个问题。我也感觉 iOS 7 里有更多的空间。我发现这大约还多了 10 分。当我想要的时候,我通常使用负空格LeftBarItemButton
从边缘开始。这对您也很有用。
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
negativeSpacer.width = -16; // it was -6 in iOS 6
[self.navigationItem setLeftBarButtonItems:@[negativeSpacer, requiredButton]; /* this will be the button which you actually need */] animated:NO];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)