1,364 questions
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 ...
2
votes
1
answer
130
views
How to programmatically trigger SwiftUI's .refreshable loading animation?
I have a SwiftUI List with .refreshable modifier that works perfectly when users manually pull to refresh.
However, I need to programmatically trigger the same refresh animation when certain ...
0
votes
0
answers
53
views
Choppy animation for SwiftUI DisclosureGroup in List
Without List
List
Just throwing this question out if there's a way to improve the animation of the DisclosureGroup in a list. The way the row just abruptly collapses in the list and the corner radius ...
-6
votes
1
answer
84
views
How can I decrease the distance between a VStack and a Section in a List View?
List {
VStack(alignment: .leading, spacing: 8) {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.vertical, 0)
.listRowBackground(Color.clear)
// 2. History ...
1
vote
1
answer
99
views
How to show trigger refreshable spinner from ViewModel?
I want to be consistent with showing the spinner when user loads a list view, and show the same List view spinner when user pulls to refresh or if the refresh is triggered from ViewModel. I understand ...
0
votes
1
answer
64
views
How to enable drag to scroll in SwiftUI List padding area
I notice in the iOS settings menu, all of their lists can be scrolled by dragging in the margins to the sides of the list items. This is only really noticeable on iPads. I'm trying to replicate this ...
0
votes
0
answers
45
views
What is the reason that there is a top padding on UIViewRepresentable in a SwiftUI container
When nesting a UIViewRepresentable inside a SwiftUI List, applying a .scaleEffect between two .frame(...) modifiers causes the view to appear with unexpected top padding in the list row.
import ...
0
votes
0
answers
42
views
List animations broken in macOS Sequoia but work in Sonoma (FetchRequest, Picker filters)
In macOS Sonoma, my SwiftUI code performs smooth, expected animations when List contents change — both when using @FetchRequest with a changing predicate and when filtering manually via Picker ...
0
votes
1
answer
245
views
How to use custom designs for a swipeAction in a list row in SwiftUI
I have a SwipeActions on my list so when the user swipes on a list row, it give's them the option to delete the current list cell. I have a button inside the SwipeActions that handles the deletion. ...
1
vote
1
answer
80
views
Is it possible to check if swipeActions() was called inside List or inside other container?
I need to use native swipeActions() if it was called inside List, and custom solution if it was called in ScrollView.
Currently closure inside swipeActions is calling in both cases, if swipeActions() ...
0
votes
2
answers
88
views
swipeActions change content size on second swipe
I made some UIImage to keep font and icon sizes according to my design. Problem: when user swipe cell - it shows content properly, but when user start closing swipe and very fast, before animation of ...
0
votes
1
answer
65
views
Is it possible to have a list style input TextField stay frozen at the top while a list of data below it is able to scroll?
The following is a simplified version of a screen that is in my app:
From the following code:
import SwiftUI
struct HomeView: View
{
@State private var textFieldUserInput: String = ""
...
0
votes
1
answer
60
views
Permanently Make List's Section Headers Transparent
I need transparent section headers in a SwiftUI List that stay transparent when they become sticky during scrolling.
Using SwiftUI Introspect, I can make headers transparent initially, but UIKit re-...
2
votes
3
answers
168
views
How to set gradient background on SwiftUI's List Section
I'm trying to set different gradient to the each section for swiftui list section but its not working and showing some weird gradient on individual cell!
I'm expecting single background for whole ...
1
vote
1
answer
48
views
SwiftUI Lists Section - Add a header and the toolbar items repeat
I am displaying a list of names in a “list". When I encapculate this in a section it works. BUT when I add the header the Toolbar items get duplicated. If I REM it out it behaves as expected, e.g....