Closed jpmcglone-airside closed 4 years ago
Fixed on the new release. Update Pages and try this
import SwiftUI
import Pages
struct ContentView: View {
@State var index = 0
var body: some View {
Pages(currentPage: $index) {
Text("First Page")
Button(action: {
self.index = 0
}) {
Text("Go to Page 1")
}
Text("Third Page")
}
}
}
If another view updates
self.currentPage
, the page surely updates, but it just snaps there. NO animation. Is there a way to make it animate to the next page?Thanks!