Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

GeometryReader and ScrollViewReader use proxies but I don't know how they are constructed. Feels like a black box. struct ContentView: View { var body: some View { GeometryReader { proxy ...
Mark's user avatar
  • 18.4k
1 vote
1 answer
65 views

Hi Stack Overflow community, I have a problem. I want to create a date picker based on a ScrollView where the starting date is today, and the range is 15 days forward and backward. For some reason, ...
miltenkot's user avatar
  • 339
0 votes
1 answer
120 views

When using a Form and embedding the items in the form in VStacks, ScrollViewReader's scrollTo(...) is not working. Without the VStacks it does. Is there a solution while keeping the VStacks? Sample ...
Annett Schwarze's user avatar
0 votes
0 answers
83 views

I am working on a SwiftUI chat application where I want the chat view to automatically scroll to the last message when the view appears and when new messages are added. The scrolling works fine for ...
AranAli's user avatar
  • 57
0 votes
1 answer
693 views

I am trying to build my own ChatGPT conversation app (SwiftUI with SwiftData, deployment target iOS 17.0) and am struggling a lot with the scrolling and keyboard behaviour in my ChatView. Basically I ...
user avatar
0 votes
2 answers
97 views

I have a View where I take input from the user. Once they click the Calculate button, I'll run a function to calculate the results and display the results below the Calculate button. What I would like ...
Sundar's user avatar
  • 1
5 votes
1 answer
2k views

I'm needing to implement a scroll-to-top button for a ScrollView living in a NavigationStack, but when I call proxy.scrollTo() (with proxy being the ScrollViewProxy provided by ScrollViewReader), the ...
Scott Muddlegeist's user avatar
1 vote
0 answers
137 views

I have a SwiftUI list view wrapped in ScrollViewReader. On change of date, I am using proxy.scrollTo(newDate, anchor: .top) to scroll to a section with corresponding date. I would ...
Petr Smejkal's user avatar
1 vote
0 answers
243 views

For some reason ScrollView should ignore safe area: ScrollViewReader { proxy in ScrollView { ... ... } .onChange(of: model.targetID) { id in proxy.scrollTo(id, ...
Artyom Zagoskin's user avatar
2 votes
1 answer
242 views

I have an issue with @AppStorage and ScrollViewReader that seems like a bug. My @AppStorage variable fontSize is supposed to adjust the text size inside a ScrollViewReader. However, when its value ...
soundflix's user avatar
  • 3,133
1 vote
1 answer
445 views

I am currently using **Xcode Version 14.3.1** (14E300c). The scrollview in the code has an array of objects that I am iterating through with, ForEach(). When the user scrolls, lets say to object 30(...
codingethics's user avatar
1 vote
1 answer
974 views

I've tried several solutions that I've found but none work for me, mostly lengthy with compile errors that I didn't understand how to fix. I collaborated with an AI today and after the third ...
Nate Lockwood's user avatar
3 votes
1 answer
5k views

I'm looking for a tidy way to identify the current visible top row from a ScrollView. I would like the NavigationTitle to display the current row number. Is there a way to do it with ScrollViewReader ...
Bob's user avatar
  • 179
0 votes
0 answers
129 views

I am using ScrollViewReader to slowly scroll images behind text. On my ScrollView I am using: .onAppear { withAnimation(.easeInOut) { proxy.scrollTo(...
user avatar
-1 votes
1 answer
398 views

I'm trying to scroll my lazyVStack using scrollViewReader. I've assigned the id to the child view i.e the ChatMessageView the id for the ChatMessageView is the index of my "messages" array ...
omi's user avatar
  • 17
1 vote
0 answers
648 views

Problem First time when the button "Go to 990" is tapped the scroll view doesn't scroll to 990 on top. (see screenshot below) The anchor is not respected. Second time it scrolls to 990 top ...
user1046037's user avatar
  • 17.9k
3 votes
1 answer
3k views

I am building a section of my app that allows users to train their skills in a sport by aiming for targets. Users can see their targets in a list. If more than 1 people are using this feature in my ...
Joris416's user avatar
  • 4,902
0 votes
0 answers
295 views

I have horizontal menu scrollView inside Parent vertical scrollView. When I select menu, it refresh it refreshes listView. But to fix parent scrollView content size, I need to refresh entire View (...
Vishwanath Deshmukh's user avatar
1 vote
0 answers
690 views

In a giant ScrollView, I want to place Circles, and scroll to them so that, when scrolled, they end up in the middle of the screen, one after another. I can position the Circles either by using ....
niklassaers's user avatar
  • 8,878
4 votes
0 answers
1k views

In a SwiftUI app with SwiftUI flow for iOS15, I'm trying to slow the animation of the ScrollViewReader scrolling speed. Clearly in the example below, the scrolling does not take 100 seconds. While the ...
JohnSF's user avatar
  • 4,400
2 votes
1 answer
4k views

I am developing an application with swiftui. After zooming, when I say scroll to the corner with the ScrollViewReader, it goes out of the screen. my code is below. It fails after trying a few times. ...
ursan526's user avatar
  • 545
0 votes
1 answer
2k views

I can't make ScrollViewReader to scroll on my List(). I have read many discussions such this or this I use a model with Identifiable protocol and id as Int: struct Country: Identifiable, Codable, ...
alex.bour's user avatar
  • 3,018
4 votes
1 answer
7k views

I need to programmatically animate the scroll of a scrollview. The scrollview contains either an HStack or a VStack. Code I tested with is this: ScrollViewReader { proxy in ...
zumzum's user avatar
  • 20.7k
9 votes
0 answers
708 views

When using a ScrollViewReader to scroll to a certain position e.g. to 40% of the width - how can you preserve the scroll position when the content of the ScrollView resizes? I wrote a small sample app ...
Isaak's user avatar
  • 1,379
4 votes
2 answers
12k views

I have a big horizontal view that doesn't fit on screen, so I put it into a horizontal ScrollView. If 0 would represent scrolled to the left completely and 1 to the right completely - How can I e.g. ...
Isaak's user avatar
  • 1,379