What layout do I expect?
I want my signupButton to have it's trailing edge 20 points before safeAreaLayoutGuide.centerXAnchor. Similarly, I want my loginButton to have its leading edge 20 points after safeAreaLayoutGuide.centerXAnchor. Below image displays the layout in desired state:

Left-to-Right Layout 👆🏾

Right-to-Left Layout 👆🏾
What does my code looks like?
let signupButton = UIButton(type: .system)
signupButton.setTitle("Signup", for: .normal)
view.addSubview(signupButton)
signupButton.bottomToSuperview(offset: -50)
signupButton.trailingToSuperview(view.safeAreaLayoutGuide.centerXAnchor, offset: 20)
let loginButton = UIButton(type: .system)
loginButton.setTitle("Login", for: .normal)
view.addSubview(loginButton)
loginButton.bottomToSuperview(offset: -50)
loginButton.leadingToSuperview(view.safeAreaLayoutGuide.centerXAnchor, offset: 20)
What output do I get with above code?
Below are the screenshots of my output:

Left-to-Right Layout 👆🏾

Right-to-Left Layout 👆🏾
The problem
It looks like the way superview methods are implemented, they work correct only for Left-to-Right language / layout direction.
What layout do I expect?
I want my


signupButtonto have it's trailing edge 20 points beforesafeAreaLayoutGuide.centerXAnchor. Similarly, I want myloginButtonto have its leading edge 20 points aftersafeAreaLayoutGuide.centerXAnchor. Below image displays the layout in desired state:Left-to-Right Layout 👆🏾
Right-to-Left Layout 👆🏾
What does my code looks like?
What output do I get with above code?
Below are the screenshots of my output:


Left-to-Right Layout 👆🏾
Right-to-Left Layout 👆🏾
The problem
It looks like the way
superviewmethods are implemented, they work correct only for Left-to-Right language / layout direction.