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
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
2 votes
1 answer
175 views

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 ...
ximmyxiao's user avatar
  • 2,923
0 votes
0 answers
56 views

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 ...
Wy th's user avatar
  • 93
-6 votes
1 answer
96 views

List { VStack(alignment: .leading, spacing: 8) { } .frame(maxWidth: .infinity, alignment: .leading) .padding(.vertical, 0) .listRowBackground(Color.clear) // 2. History ...
Acaibird's user avatar
1 vote
1 answer
114 views

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 ...
Wy th's user avatar
  • 93
0 votes
1 answer
67 views

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 ...
Davido's user avatar
  • 2,933
0 votes
0 answers
49 views

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 ...
Hovey Ying's user avatar
0 votes
0 answers
44 views

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 ...
user10711707's user avatar
0 votes
1 answer
363 views

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. ...
DevChris's user avatar
1 vote
1 answer
86 views

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() ...
Konstantin.Efimenko's user avatar
0 votes
2 answers
107 views

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 ...
Konstantin.Efimenko's user avatar
0 votes
1 answer
67 views

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 = "" ...
Ser Pounce's user avatar
  • 14.3k
0 votes
1 answer
85 views

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-...
Vojta Böhm's user avatar
2 votes
3 answers
192 views

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 ...
SPatel's user avatar
  • 4,970
1 vote
1 answer
56 views

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....
Edward Hasted's user avatar
0 votes
1 answer
31 views

Here's the simplest code I tried that acts wrong: the grid has 10 red rectangles and 1 black rectangles the grid has 6 red rectangles and 5 black rectangles LazyVGrid(columns: Array(repeating: .init(....
Mark Daylight's user avatar
0 votes
1 answer
132 views

I’m building a SwiftUI app that displays a list of Streamer objects. Each Streamer is an @Observable class, and I keep them in a modelManager singleton. @Observable class Streamer: Identifiable { ...
HáMzà VyNøs's user avatar
0 votes
0 answers
63 views

I am working with a simple SwiftUI List and I want to enable functionality that allows files and images to be dropped onto the List from outside the app. There is an onInsert modifier with List that ...
Z S's user avatar
  • 7,577
0 votes
0 answers
106 views

How do I change the neon selected background color to something like red? I tried .tint and .listRowBackground but they aren't working. The only working solution is to change the accent color in ...
Donat Kabashi's user avatar
0 votes
0 answers
79 views

As the title says, I am not sure how to properly build an inverted ScrollView where I can safely insert items above my data ("prepend") without everything jumping around. My current code is ...
mrousavy's user avatar
  • 1,255
1 vote
0 answers
16 views

In a SwiftUI List, when switching from a default keyboard to decimalPad keyboard, the List scrolls down unnecessarily and the focused textfield is hidden by keyboard. struct ListTextField: View { @...
arterzz's user avatar
  • 31
0 votes
1 answer
96 views

I might be missing something obvious here, but I can't find how to get around it. I want to have List() with limited height, that allows me to scroll inside it. This is an example code: struct ...
Kaven's user avatar
  • 491
0 votes
1 answer
51 views

I`ve adapt official Apple tutorial app for my needs. There is a ContentListView that displays a list of recipes on one side and a form to edit the selected recipe on the other. The form includes a ...
Captain_Apollo's user avatar
0 votes
0 answers
50 views

When checking a checkbox Button in List: Click/tap events don't trigger the expected response The associated action button only activates with a press+slide What could be causing this interaction ...
arterzz's user avatar
  • 31
0 votes
1 answer
38 views

Trying to add a clear background to all cells, so I applied listRowBackground(Color.clear) to each List. All worked, except the second instance (commented out in the code below). Uncommenting it out ...
Bartender1382's user avatar
0 votes
1 answer
44 views

For a List in SwiftUI, I would like the list background to be clear so that only the cells appear, with the foreground and background I decide. When an iOS device is in light mode it's ok. But if it's ...
Bartender1382's user avatar
0 votes
2 answers
91 views

Problem: Adding Menu inside List but only the text(black area) is tappable not the entire row. The source code and resulting image are shown below. struct testMenuInList: View { var body: some ...
Kesu's user avatar
  • 1
0 votes
1 answer
115 views

I have a simple SwiftData app. Whenever ImageLibraryView appeared, there were microhangs because images inside each ThumbnailView were being loaded synchronously. So I solved that by loading the ...
RRR's user avatar
  • 315
1 vote
1 answer
115 views

I am working with a SwiftUI List on macOS, and I have a popover view that I need to show from each row. I have an implementation that works but it shows the popover from one fixed point on the row. I ...
Z S's user avatar
  • 7,577
0 votes
0 answers
51 views

With the below code, if I try to scroll the list very fast of drag it up or down multiple times. I see the following error. Invalid sample AnimatablePair<AnimatablePair<CGFloat, CGFloat>, ...
NNikN's user avatar
  • 3,858
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
0 votes
2 answers
240 views

I have a SwiftUI List (on macOS) where I want to display a few TextFields in each row, and observe how the focus changes as an individual text field is selected or unselected. This seems to work fine ...
Z S's user avatar
  • 7,577
1 vote
1 answer
774 views

I am working on a chatbot app and want to implement a chat interface similar to ChatGPT's UI. When a user sends a message: The previous messages should move out of view at the top. The user's latest ...
Maaz Siddiqui's user avatar
1 vote
1 answer
86 views

Context In a Mac (nb: NOT iOS) app, I have a complex OutlineView that is powered by SwiftUI's List and various embedded DisclosureGroups. Here's what it looks like: Question I need control over which ...
Bryan's user avatar
  • 6,027
0 votes
1 answer
234 views

I have a list in my view, which contains plenty of fruits. I want to move the fruit inside the list, except I don't want to move Banana. Here's my code: struct FruitsView: View { @State private ...
Harry CHOI's user avatar
0 votes
0 answers
40 views

I am trying to construct a view where they are multiple buttons, and selecting each button can show a different List view. I want to be able to select the controls with just the keyboard, so if the '...
Z S's user avatar
  • 7,577
1 vote
1 answer
53 views

The following code is working perfectly fine when iCloud is deactivated. A meeting object is saved to the DB and the list on ContentView is updated properly. But when I activate iCloud the list is not ...
MatFetsch's user avatar
0 votes
1 answer
89 views

I have a list of items and when user click on it, I need to show some content in .popover(). Model: struct Item: Identifiable { var id: String { UUID().uuidString } var name: String? var ...
Mahendra's user avatar
  • 8,962
1 vote
0 answers
120 views

Well Im just creating a personal project and then I face this bug. My navigation looks like this, if you compile the code and then try to navigate while you are not searching the .toolbar(.hidden) is ...
DiegoMod1's user avatar
1 vote
1 answer
36 views

I want to delay the sheet presentation via shouldPresentEditExpense. The reason is to show a selection animation of a cell. The selectable effect takes place via ViewModifier. overlay { isSelectedItem ...
RafaSG13's user avatar
0 votes
1 answer
54 views

This particular SwiftUI List, made up of array, I can not seem to select it. Even though I tried with Set(). or @Binding. everything online resource has to offer. Wrong type? or something might have ...
Supercosition's user avatar
1 vote
1 answer
61 views

I'm digging into the weeds of SwiftUI and learning about view Identity for the first time. When playing around with some code and following along with WWDC talks I'm hitting some confusing animations. ...
Charles Fiedler's user avatar
0 votes
1 answer
77 views

I am experimenting with SwiftUI and noticed unexpected behavior when using a custom view inside a List. Here’s the simplified code: import SwiftUI struct ContentView: View { var body: some View { ...
de.'s user avatar
  • 8,787
-1 votes
1 answer
122 views

Within a Scrollview, i am trying to have a pinned SectionHeader with a simple segmented PickerView, that can switch to two different item Stacks. One very long and one very short. This works fine, as ...
mlalty's user avatar
  • 41
2 votes
2 answers
52 views

Apologies because I'm new to SwiftUI - I have a class (Meal) that contains an array of objects of another class (Food). What I'm trying to achieve here is to be able to add foods and have that update ...
Moses Harding's user avatar
0 votes
0 answers
42 views

I have one view named CongratulationOverlay, and in bottom there is one horizontal list. Now I want that overlay view to slide in to the horizontal list as I am appending that into list. and ...
Jatin's user avatar
  • 1
1 vote
1 answer
107 views

I'm working on iOS 17+ app in SwiftUI, which uses MapKit. MapKit's Map view adds a gradient/material view on Toolbar, which is presented on second and every next navigation. I would like to get the ...
GPH4PPY's user avatar
  • 115
2 votes
1 answer
199 views

This is in Xcode 16.2 with the iOS 18 SDK, build target iOS 17. I have some very simple code: List { HStack { TextField("Some field", text: .constant("Hello")) ...
Joris's user avatar
  • 6,322
3 votes
2 answers
617 views

I'm trying to achieve a specific UI design in SwiftUI where the bottom section of my List has a different background color than the top section. For example, the "Your Medications" Section ...
anol1258's user avatar
0 votes
2 answers
192 views

I am trying to implement a SwiftUI list for a sidebar view which has at least 3 different types of data points: a) a fixed list of enums, b) a list of 'tags' coming from a @FetchRequest using Core ...
Z S's user avatar
  • 7,577

1
2 3 4 5
28