Skip to main content
0 votes
1 answer
65 views

How to make a Button work inside a ScrollView but outside of the ScrollView's bounds in SwiftUI?

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
94 views

SwiftUI programmatic scrolling misses on frequent updates to value

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
48 views

How to use a button to change the position of ForEach generated views using ScrollView and the .scrollPosition modifier [closed]

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
88 views

Collapsible header hides after pull-down gesture

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

How to synchronize the scroll position between two repeating, scrollable 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
76 views

SwiftUI ScrollPosition and viewAligned behavior

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
1k views

ScrollViews at the bottom of NavigationStack cause the navigation title to be invisible in iOS 26

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
  • 290k
0 votes
0 answers
27 views

SwiftUI Horizontal Scroll of columns with max width and adjusted height

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
66 views

Form Items inside scrollview randomly stops being clickable

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
74 views

How to maintain scroll position across tabs and rotation in SwiftUI?

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
79 views

Scrollable list items flicker when keyboard is dimissed

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
131 views

Update zIndex based on scroll position in ScrollView

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
186 views

SwiftUI ScrollView scrollTargetLayout not working

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
92 views

SwiftUI ScrollView Custom Canvas Component Issues

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
78 views

List cannot scroll vertically If hovered a List subview that needs to support horizontal scrolling

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

15 30 50 per page
1
2 3 4 5
14