I add custom button to my tabbar with following this answer.
var menuButtonFrame: CGRect = menuButton.frame
//menuButtonFrame.origin.y = tabBar.frame.y + tabBar.frame.height - menuButtonFrame.height
menuButtonFrame.origin.y = view.bounds.height - menuButtonFrame.height
menuButtonFrame.origin.x = self.view.bounds.width / 2 - menuButtonFrame.size.width / 2
menuButton.frame = menuButtonFrame
menuButton.backgroundColor = Colors.mainColor
menuButton.layer.cornerRadius = menuButtonFrame.height/2
self.view.addSubview(menuButton)
when i tested on simulator it works good. but when i tested on Iphone X simulator it displays under tabbar.
I tried to align buttons origin.y
value to tabbar bottom (commented line) but it didn't work again.
Should i use iphone x specific alignment or is there more clean solution for this.