pavlopedai
This is a good lib, but looks like it's not dealing with rotation at all. - Add some pages - Rotate -> Layout is broken
#14 · closed · 3 comments
This is a good lib, but looks like it's not dealing with rotation at all. - Add some pages - Rotate -> Layout is broken
Doesn't seem to be broken when I try it. For example, this layout works on both landscape and portrait: ```swift import SwiftUI import Pages struct HomeView: View { @State var index = 0 var body: some View { Pages(currentPage: $index) { VStack { Text("First Page") Text("First Page -- Part 2") HStack { Text("Horizontal 1") Spacer() Text("Horizontal 2") } } Text("Second Page") Text("Third Page") } } } struct HomeView_Previews: PreviewProvider { static var previews: some View { HomeView() } } ``` Could you add a reproducible example of what you mean?
Ok, then the issue must be my layout itself. Posted an issue without proper research, sorry. Thanks for quick reply!
The issue was not related to page view at all. Frames aren't updating correctly if set via `.frame(width: proxy.size.width, height: proxy.size.heigh)` Sorry for disturbing.