I\'ve started to learn SwiftUI. I try to update UI when orientation is changing. I added @Environment(\\.horizontalSizeClass) var sizeClass in my view, and then
@Environment(\\.horizontalSizeClass) var sizeClass