Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

I have a ScrollView with several Buttons and a .refreshable modifier. As soon as I pull to refresh and the refresh indicator appears, the tap targets no longer match the visible button positions. For ...
mbuchetics's user avatar
  • 1,450
0 votes
1 answer
56 views

The following code fails to update scrollPosition in SwiftUI ScrollView when the user auto-scrolls, i.e. swipes the finger to scroll and picks up the finger immediately. While the scroll view ...
Deepak Sharma's user avatar
0 votes
1 answer
85 views

I observed a weird behavior and I believe it's a bug in SwiftUI but maybe it's not or someone knows a way to fix it. By default, overlays have the same size as the view they are attached to in SwiftUI....
Mischa's user avatar
  • 17.5k
1 vote
1 answer
121 views

I have the following code of a scrolling scrubber. Problem is programatic scrolling either on startup ('onAppear') does not work, and even in the middle it is unpredictable where sometimes it works ...
Deepak Sharma's user avatar
0 votes
1 answer
51 views

I'm trying to create a paginated text element that loads strings from a simple array (of unknown range), which can be navigated through using a 'next' button. Think of character dialogue boxes in old-...
MightyMeta's user avatar
1 vote
1 answer
96 views

I’m trying to implement a collapsible header in SwiftUI that collapses when the user scrolls down and expands when the user scrolls up. I followed this Medium post: Collapsible Header in SwiftUI The ...
udi's user avatar
  • 327
1 vote
1 answer
131 views

I am trying to recreate this view from an app. essentially its two repeating/infinite scrollable views. the top contains the days of the week, and the bottom is a paging view that shows the classes on ...
user31158611's user avatar
1 vote
1 answer
81 views

I have a discrete scrubber implementation using ScrollView in SwiftUI that works but fails in the end points sometimes. For instance, scrolling it all the way to bottom shows a value of 87 instead of ...
Deepak Sharma's user avatar
3 votes
5 answers
2k views

I have a NavigationStack that contains a ScrollView at the bottom of the screen. struct ContentView: View { var body: some View { NavigationStack { VStack { ...
Sweeper's user avatar
  • 292k
0 votes
0 answers
31 views

I’m working on a kanban-style app with a horizontal scroll view of columns representing different states. Each column contains some text elements. I want the columns to adjust their width based on the ...
Jeronimo Cabezuelo Ruiz's user avatar
0 votes
0 answers
69 views

I need view like this in order to have fixed size form with scrollable capability. I have disclosure groups, buttons and textfields inside form. struct ContentView: View { var body: some View { ...
spt025's user avatar
  • 2,324
0 votes
0 answers
96 views

I have a view called SurahView. In this view, I need 2 modes: translation and reading. In the translation mode, I have a series of verses with both the Arabic text and English text for each verse. In ...
Ali's user avatar
  • 1
0 votes
1 answer
84 views

In code below, when the list has more items than can fit on the screen, when the keyboard is dismissed the list items flicker, appear jittery. I have not been able to find a solution. I suspect ...
Rhythmus's user avatar
  • 241
0 votes
1 answer
134 views

This code shows a cover-flow-style view where you can scroll through the images in a Scroll View, while the images itself come from an array. The spacing is -100 to let the other pictures not in the ...
Christian's user avatar
0 votes
2 answers
232 views

I have the following scrubber implementation in SwiftUI. The + button is supposed to move the ScrollView up by 1 tick (or scrollPosition incremented by 1) but the issue is no scrolling happens until I ...
Deepak Sharma's user avatar
1 vote
0 answers
98 views

I'm trying to replicate Apple's Freeform app's canvas view in SwiftUI. I have tried approaching this from every side but it feels like I'm fighting the framework instead of working with it. Here's ...
devon't's user avatar
  • 141
1 vote
1 answer
80 views

I have a List that contains some views, some of which need horizontal scrolling. It is important to note that none of the views require vertical scrolling. When my mouse hovers over the views that do ...
Binglei Ma's user avatar
7 votes
5 answers
580 views

I am trying to create a day calendar view, similar to the iOS calendar app. There is a feature on the app where you can pinch the calendar to change the distance between hours, which I am trying to ...
ted's user avatar
  • 79
0 votes
3 answers
157 views

In my code, I want the indicators to not have a background but still be included in my UI. Therefore, I want this layout, but it has an issue—I cannot clip the ScrollView to remove those four extra ...
Mango's user avatar
  • 103
0 votes
2 answers
376 views

SwiftUI's scroll behavior is vexing. So, using iOS 18 newest APIs... If I use a custom id tag and scrollTo on its own, it works fine (actually not fine, it often scrolls to the wrong place with ...
MadeByDouglas's user avatar
1 vote
0 answers
64 views

TabView views only show when I remove the ScrollView. But I need the ScrollView for my complex UI, so how do I fix this? ScrollView { VStack { if showDivider { Divider(...
CobraCodes's user avatar
0 votes
0 answers
74 views

If i have the following code in a SwiftUI view: NavigationView { NavigationLink(destination: ScrollView{}, label: { Text("Thing") }) } It creates this ...
David Reese's user avatar
0 votes
1 answer
419 views

I need to get the ScrollView value, and I already have one solution, but it's not very optimized. And I have a strong feeling that I'm missing a simpler solution. My final goal is get the ScrollView ...
Jan Ivashenko's user avatar
1 vote
1 answer
308 views

I integrated a composable view into my Compose Multiplatform project and embedded it within an iOS UIScrollView. I expected the scroll view to function as intended, allowing smooth vertical or ...
Yash Kalariya's user avatar
3 votes
1 answer
4k views

I've been fighting with GeometryReader and .onChange(of: geo.frame(in: .global).minY) for a long time trying to get this to work with no great success. Consider the following: struct TestScreen: View {...
soleil's user avatar
  • 13.3k
0 votes
0 answers
83 views

Swift Beginner, I want to achieve a scrolling effect similar to Snapchats filter changer. It's a static circlestroke with round images you can drag into it. Here's a Screenshot. I'm using a horizontal ...
Alex E's user avatar
  • 1
1 vote
0 answers
142 views

I am writing an application and have a structure similar to the following: ScrollView { VStack { Button(action: { print("hello") }) { Text("...
user2826739's user avatar
0 votes
1 answer
331 views

I have SwiftUI grid of 25 rows with a first header row and a totals row at the bottom. I would like the header and the totals row to remain fixed, but allow the user to scroll the 23 rows (as they ...
Alex's user avatar
  • 120
0 votes
0 answers
61 views

In our app, we display a large list of items (roughly 30000 items) whereby each item needs to convert a complex/long string with tags into a NSAttributedString which is then displayed. We have ...
Sebastian's user avatar
  • 153
6 votes
5 answers
1k views

I am using the new navigationTransitionStyle(.zoom(id, namespace)) to zoom from a view preview to a detail view in my swiftUI app. My issue is that I have a snapping scrollView in the detail view, ...
Brian.Masse's user avatar
2 votes
4 answers
3k views

I am currently struggling on my ChatView of my app. This is a sample code of what i want to achieve. It has functionality such as when the user is about to reach the top it fetches older messages and ...
Franky11's user avatar
  • 105
0 votes
0 answers
37 views

I've built a CustomScrollView in SwiftUI that accepts a topContent: View and bottomContent: View, and reports the Y offset along with the frame height of the topContent. Here's my implementation:: ...
Burrata8357's user avatar
0 votes
0 answers
143 views

I have an issue with loading Images from SwiftData or from Disk (Directory Folder) into a SwiftUI View. In the below example is the ScrollView with the LazyVGrid loading Images from SwiftData - (...
Armin Scheithauer's user avatar
14 votes
3 answers
6k views

Ever since Xcode 16, whenever there is a subview with a horizontal DragGesture inside a vertical ScrollView, horizontal drag gesture is detected on the subview but any scrolling up/down is not ...
Shri's user avatar
  • 213
0 votes
0 answers
71 views

I'm working with a vertical ScrollView in SwiftUI, and I want to have dynamic resizing for two components inside it. Specifically, I want one component to have a constrained maxWidth and maxHeight (up ...
Burrata8357's user avatar
-1 votes
1 answer
88 views

If you use the onAppear method to scroll to a SwiftUI view with the help of a ScrollViewProxy, this can lead to the loss of the state transition in the view when using published values of an ...
ITGuy's user avatar
  • 865
1 vote
2 answers
213 views

I'm having an issue with SwiftUI where only the top part of the button is clickable, while the bottom part is not clickable at all. Here is my code snippet. Does anyone know how I can fix this? struct ...
Chad Chiu's user avatar
0 votes
0 answers
75 views

I'm a beginner to Swift and SwiftUI and I am building a side-project. I am attempting to load an interactive 3d model (fetching from Spline Cloud link) into a ScrollView, but the gestures with the 3d ...
zebra14's user avatar
  • 57
4 votes
2 answers
3k views

I'm new to Swift UI and I'm having troubles to make a specific UI behave the way I want. I have a ScrollView that has some content. This content in a VStack can be as small as 1-3 text components to ...
Barrufet's user avatar
  • 292
9 votes
2 answers
2k views

I'm trying to use SwiftUI's viewAligned scrollTargetBehavior for a ScrollView where scrollTargetLayout subviews are irregular in size. Here's an example, which I've simplified for the purpose of ...
user avatar
1 vote
2 answers
1k views

I have a SwiftUI related question. I'm trying to make a chat and make messages appear at the bottom of the screen (like at the screen from Telegram). All solutions I tried keep rendering messages at ...
Sasha's user avatar
  • 13
1 vote
2 answers
126 views

I'm learning about Lists and ScrollViews in SwiftUI and one of the modifiers that is available is: public func scrollIndicatorsFlash(trigger value: some Equatable) -> some View Documentation My ...
Roberto's user avatar
  • 3,899
0 votes
1 answer
232 views

In my project I have two LazyVGrids inside the same ScrollView, which are dynamically loading content: pages of the first grid are requested every time the user is reaching the end, and when all the ...
Jaime Alcántara Arnela's user avatar
2 votes
1 answer
84 views

I have a List inside a ScrollView that is scroll disabled. The List also disables and cannot be enabled. I need the ScrollView to not scroll by drag gesture. Is there a way to allow the List to scroll ...
Cyklist's user avatar
  • 89
0 votes
0 answers
222 views

Investigating strange navigation bug in my iOS app. I'm using NavigationStack for push-navigation and a dedicated ObservableObject Communicator which holds current NavigationStack's path. What I want ...
FunnyHorse's user avatar
2 votes
0 answers
797 views

I have a horizontal scroll view and a fixed array. I would like to loop it such that when I scroll left and get near the end, the array will add the items in the beginning to the end so that the user ...
HeySaiK's user avatar
  • 580
0 votes
2 answers
1k views

In the app I'm working on I have a details view that uses ScrollView to display a bunch of information. I want to use a List inside that ScrollView to display some specific data. However, you can't ...
Jordan Herget's user avatar
1 vote
1 answer
296 views

I want the ScrollView to scroll to top when I tap on the tab. It works but it stops parallel to the navigation title and doesn't scroll all the way below the title as expected. The current behaviour ...
Heshan's user avatar
  • 985
0 votes
0 answers
397 views

I'm working with SwiftUI and trying to do a ScrollView that can be filtered (it's basically a list). The stack looks like this: class ViewModel: ObservableObject { @Published var isRefreshing =...
André's user avatar
  • 326
1 vote
0 answers
217 views

I am trying to write my own MyScrollView to manage scroll. I am doing this because I want to have a LazyVStack with items that have varying heights and for which I can scroll to any item inside. So, ...
InsightClip's user avatar
  • 1,038

1
2 3 4 5