In iOS 11 the UIBarButtonSystemItemFlexibleSpace
bar button system item type doesn't create any spacing. I was using it to distribute space evenly between bar button items. Is this desired behavior in iOS 11 or a bug? Is there a workaround?
There aren't any notes about any changes for UIBarButtonSystemItemFlexibleSpace
in iOS 11 in the current documentation.
https://developer.apple.com/documentation/uikit/uibarbuttonsystemitem/uibarbuttonsystemitemflexiblespace
Here is an example that in iOS 10 will show three bar button items that are evenly spaced across the entire width of the navigation item.
UIBarButtonItem *flex = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
NSArray *items = @[leftButton, flex, middleButton, flex, rightButton];
[self.navigationItem setLeftBarButtonItems:items animated:YES];