I've inherited a project that has a table which displays other viewcontrollers when you select a row. Nothing fancy. However some of the viewcontrollers are UISplitViewController
s. This works fine on the iPad as expected. All buttons show. However on the iPhone when navigating to these controllers, it shows the master controller as expected. But none of the bar buttons show up in the nav bar like they do on the iPad. Any ideas?
How one of the buttons is set:
let backbtn = UIButton(type: UIButtonType.custom)
backbtn.setImage(arrowImage, for: UIControlState.normal)
backbtn.addTarget(self, action: #selector(onBackToTeamListTouch), for: UIControlEvents.touchUpInside)
backbtn.frame = CGRect(x: -3, y: -1, width: 35, height: 35)
let backButtonView = UIView(frame: CGRect(x: 0, y: 0, width: 35, height: 35))
backButtonView.bounds = backButtonView.bounds.offsetBy(dx: 14, dy: 0)
backButtonView.addSubview(backbtn)
let backArrow = UIBarButtonItem(customView: backButtonView)
backArrow.tintColor = .white
self.navigationItem.leftBarButtonItems = backArrow