1,356 questions
0
votes
0
answers
92
views
Change the selected item highlighted background color inside the ListView
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 ...
0
votes
0
answers
20
views
Maintaining a stable scroll position when inserting items above in a ScrollView
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 ...
1
vote
0
answers
11
views
SwiftUI List scrolls down unexpectedly when switching keyboard from default to decimalPad
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 {
@...
0
votes
1
answer
48
views
SwiftUI MacOS - scrollable List
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 ...
0
votes
1
answer
48
views
List, form updating and cursor issue
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 ...
0
votes
0
answers
41
views
SwiftUI Button in List works only with press+slide rather than tap
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 ...
0
votes
1
answer
23
views
Why does using .listRowBackground in only one instance gives me a compiler error, while other instances do not?
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 ...
0
votes
1
answer
24
views
Can I make a SwiftUI's List background clear, so only the cells show?
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 ...
0
votes
2
answers
57
views
SwiftUI Menu in List only the Text is tappable
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 ...
0
votes
1
answer
56
views
Animating items in a SwiftUI list only at first appearance
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 ...
1
vote
1
answer
51
views
SwiftUI: Show popover at mouse click location
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 ...
0
votes
0
answers
43
views
List throwing Invalid sample AnimatablePair With Drag Gesture [duplicate]
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>, ...
1
vote
1
answer
67
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 ...
0
votes
2
answers
84
views
SwiftUI: TextField not getting focus changes inside Button
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 ...
0
votes
1
answer
221
views
Chatbot UI Like ChatGPT in iOS SwiftUI
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 ...