Post

Replies

Boosts

Views

Activity

Reply to ScrollViewReader's scrollTo may be broken on iOS 15
In my case, LazyVStack helped to fix the scrollTo issue struct ContentView: View {  var body: some View {   ScrollViewReader { proxy in    ScrollView {     VStack {      Color.yellow       .frame(height: 800)      ScrollButton(proxy: proxy)     }    }   }  } } struct ScrollButton: View {  let proxy: ScrollViewProxy  @Namespace var bottomId  var body: some View {   LazyVStack {    Button("Scroll") {     withAnimation {      proxy.scrollTo(bottomId)     }    }    Color.red     .frame(height: 500)     .id(bottomId)   }  } } struct ContentView_Previews: PreviewProvider {  static var previews: some View {   ContentView()  } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to ScrollViewReader's scrollTo may be broken on iOS 15
In my case, LazyVStack helped to fix the scrollTo issue struct ContentView: View {  var body: some View {   ScrollViewReader { proxy in    ScrollView {     VStack {      Color.yellow       .frame(height: 800)      ScrollButton(proxy: proxy)     }    }   }  } } struct ScrollButton: View {  let proxy: ScrollViewProxy  @Namespace var bottomId  var body: some View {   LazyVStack {    Button("Scroll") {     withAnimation {      proxy.scrollTo(bottomId)     }    }    Color.red     .frame(height: 500)     .id(bottomId)   }  } } struct ContentView_Previews: PreviewProvider {  static var previews: some View {   ContentView()  } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to ScrollViewReader's scrollTo may be broken on iOS 15
I have the same problem, please let us know if some of you have the answer or solution, cheers
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21