I got wrong width and height when rotate screen. It works in iOS 15;
[UIScreen mainScreen].bounds.width will return the height.
[UIScreen mainScreen].bounds.height will return the width.
They exchanged values
I try to use "setNeedsUpdateOfSupportedInterfaceOrientations" but failed.
Is there any solution to solve the issue?