I cannot for the life of me figure out how allow UIBarButtonItems to be clickable / tappable on iOS 11 on iPad. UIBarButtons work perfectly on iPhones running iOS 11 (and below) and on iPads running iOS 10 and below. Here is the code I'm using to create the UIBarButtonItem on a UITabBarController:
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Account"] style:UIBarButtonItemStylePlain target:self action:@selector(accountOptions:)];
barButton.imageInsets = UIEdgeInsetsMake(-.5, 0, .5, 0);
self.navigationItem.rightBarButtonItem = barButton;
I've tried adding AutoLayout constraints for width and height programmatically (with at least 2 different ways of going about it), but have had no luck. I may have done them incorrectly, so I am open still to that solution.
I've tested this on both a simulator and a real iPad and have the same result.
I've also read and tried this solution several times with no luck: UIBarButtonItem not clickable on iOS 11 beta 7?