Questions tagged [scrollviewreader]
34 questions
0
votes
2 answers
SwiftUI, Core Data, ScrollViewReader - [error] precondition failure: invalid graph update (access from multiple threads?)
I'm trying to make a list of Core Data items in SwiftUI where adding new item will also trigger scroll to last item.
Here is a code I have. It's based on sample Core Data app in Xcode. One Entity: Item with one attribute: timestamp.
import…

mallow
- 2,368
- 2
- 22
- 63
0
votes
1 answer
Make ScrollViewReader scroll to item using a list and identifiable protocol in SwiftUI
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, Hashable {
// database fields
var…

alex.bour
- 2,842
- 9
- 40
- 66
0
votes
1 answer
ScrollViewReader's proxy.scrollTo not scrolling
I have this SwiftUI code that builds a large UI view that's too big to fit on screen, so I've put it in a 2D scrollview. While this example is a grid, let's assume the content fills just as much but the items are more randomly placed. When the view…

niklassaers
- 8,480
- 20
- 99
- 146
-1
votes
1 answer
ScrollViewReader won't scroll the View
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 which is a published object in ChatManager class. I want the…

omi
- 17
- 7