In our app we have a TableViewController that is vertically flipped by setting tableView.transform = CGAffineTransform(scaleX: 1, y: -1) (and the same is applied to all cells).
We noticed in iOS 14, initially the layout respects the safe area as expected, but after rotating the device it does not update properly, but the same safe area insets as before are applied. So for example when opening the view in portrait and then rotating to landscape, the insets left and right are still 0 and the content is rendered outside the safe area.
When looking at tableView.safeAreaInsets, you can see the values are not updated after rotating, and viewSafeAreaInsetsDidChange() does not get called. The bug can be reproduced with any transformation.
This worked perfectly fine in iOS 13. Is this a bug in UIKit? Is there a workaround?
We noticed in iOS 14, initially the layout respects the safe area as expected, but after rotating the device it does not update properly, but the same safe area insets as before are applied. So for example when opening the view in portrait and then rotating to landscape, the insets left and right are still 0 and the content is rendered outside the safe area.
When looking at tableView.safeAreaInsets, you can see the values are not updated after rotating, and viewSafeAreaInsetsDidChange() does not get called. The bug can be reproduced with any transformation.
This worked perfectly fine in iOS 13. Is this a bug in UIKit? Is there a workaround?