I\'ve an UIView Controller with four square buttons and I\'ve set them round with a border. It works perfectly on iPhone 8 and iPhone X but in iPhone SE and iPhone 8 Plus the UI
set button cornerRadius in viewDidLayoutSubviews method of viewcontroller
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
// Edit it to round
topLeftButtonImage.layer.cornerRadius = topLeftButtonImage.bounds.size.height / 2
topLeftButtonImage.clipsToBounds = true
// Add border
topLeftButtonImage.layer.borderColor = UIColor.white.cgColor // Button border color
topLeftButtonImage.layer.borderWidth = 4 // Button border width
}