Objective c UIBarButtonSystemItemFlexibleSpace不';我不能在iOS 11中工作

Objective c UIBarButtonSystemItemFlexibleSpace不';我不能在iOS 11中工作,objective-c,uibarbuttonitem,ios11,Objective C,Uibarbuttonitem,Ios11,在iOS 11中,UIBarButtonSystemFlexibleSpacebar按钮系统项类型不会创建任何间距。我用它来平均分配酒吧按钮项目之间的空间。这是iOS 11中所期望的行为还是一个bug?有解决办法吗 当前文档中没有任何关于iOS 11中的uiBarButtonSystemFlexibleSpace更改的注释。 下面是一个例子,在iOS 10中,将显示三个在整个导航项宽度上均匀分布的条形按钮项 UIBarButtonItem *flex = [[UIBarButtonItem a

在iOS 11中,
UIBarButtonSystemFlexibleSpace
bar按钮系统项类型不会创建任何间距。我用它来平均分配酒吧按钮项目之间的空间。这是iOS 11中所期望的行为还是一个bug?有解决办法吗

当前文档中没有任何关于iOS 11中的
uiBarButtonSystemFlexibleSpace
更改的注释。

下面是一个例子,在iOS 10中,将显示三个在整个导航项宽度上均匀分布的条形按钮项

UIBarButtonItem *flex = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
NSArray *items = @[leftButton, flex, middleButton, flex, rightButton];
[self.navigationItem setLeftBarButtonItems:items animated:YES];

我不确定,但我怀疑这个问题是否与
uiBarButtonSystemFlexibleSpace
直接相关。iOS 11可能已经使用
leftBarButtonItems
righBarbuttonItems
更改了导航栏上按钮的布局方式。我敢打赌,如果你在工具栏上设置相同的项目数组,它会像预期的那样工作。我也有同样的问题。其他帖子暗示这可能是由于autolayout覆盖了你的UIBarButton数组项。我也有同样的问题。难道苹果公司没有人使用uiBarButtonSystemEmitmFlexibleSpace吗?!可能重复的