swiftui-list Questions

4

Solved

I want to make my List inside a ScrollView so that I can scroll List rows and headers together. But I found that List inside ScrollView isn't working. It shows nothing. I should use both of them. ...
Guanidine asked 15/3, 2020 at 1:29

1

I saw this error after I made a huge change to my app's code. I wonder if anyone knows what it means and if it's OK to ignore it. List failed to visit cell content, returning an empty cell. - Swif...
Martres asked 1/5, 2023 at 8:59

4

Solved

Creating a List as follows: struct ContentView: View { var body: some View { List { Section(header: Text("Header")) { Text("Row 1") Text("Row 2") } } .listStyl...
Bluegrass asked 6/7, 2020 at 9:41

8

Solved

The default colour of a list row when tapped is grey. I know how to change background colour using .listRowBackground, but then it changes to the whole list. How can I change to a custom colour w...
Pastiche asked 2/12, 2019 at 15:8

3

Solved

listRowInsets(_:) is not working as expected when using List() and List(Data,id). in Example 1 below works perfectly with zero insets, while in Example 2 it does nothing. Example 1: struct Cont...
Jaquelin asked 19/11, 2019 at 8:0

2

I have a List showing CoreData FetchedResults. I would like to implement the possibility to move row and at the same time update the order attribute of the entity. FetchedResults is not an array so...
Frissell asked 28/3, 2020 at 15:40

4

Solved

My app is built in SwiftUI and mostly works as is with iOS 16 apart from a couple of design quirks which I'm currently working on a fix for. One of the quirks is the background colours of lists. Pr...
Satisfaction asked 6/11, 2022 at 15:37

2

Lately, I have been working on creating a complex view that allows me to use a Picker below a Form. In every case, the Form will only have two options, thus not enough data to scroll downwards for ...
Nigritude asked 28/3, 2020 at 19:9

1

Caught a strange situation. In the new version of iOS, the controls for the video player are not shown if the video player is placed inside the list. In iOS 15.6.1 this code works fine as it should...
Standby asked 15/9, 2022 at 20:56

26

Solved

I am new to SwiftUI (like most people) and trying to figure out how to remove some whitespace above a List that I embedded in a NavigationView. In this image, you can see that there is some white s...
Grenier asked 16/8, 2019 at 1:1

1

I'm experiencing a visual bug when using a List and TextFields in SwiftUI. After focusing on a TextField in the List and then removing the focus (I've tried various methods of doing this, like Butt...
Pages asked 29/10, 2022 at 20:42

1

I hide the navigation bar and provide a customized navigation bar. But my list appears below the navigation bar. I want the list to appear below the navigation bar when scrolling. My desired effect...
Basketball asked 29/10, 2022 at 4:29

2

Solved

I am trying to scroll to a newly appended view in a SwiftUI List using ScrollViewReader but keep crashing with EXC_BAD_INSTRUCTION in scrollTo(_:) after adding a few items. I am using Xcode 14.0.1 ...
Naamann asked 8/10, 2022 at 22:59

5

Solved

I created a list in SwiftUI. I want to change the color or remove the separator as, In UIKit, we can easily change the color of separator in TableView. Below is the code and UI(image) of the list ...
Krasnodar asked 25/10, 2019 at 13:27

4

Solved

With the new SwiftUI update in iOS 16 List no longer depends on UITableView. So the following snippet we used to set the List background color to .clear is now useless: UITableView.appearance().bac...
Guillemette asked 16/6, 2022 at 17:44

1

It seems there is no default separator in List by using SwiftUI on macOS. So I am using Divider to add by manual. But when I enable multiple line selection, the app will render a white line automat...
Leverrier asked 27/1, 2021 at 7:8

2

I tried a SwiftUI tutorial, "Handling User Input". https://developer.apple.com/tutorials/swiftui/handling-user-input I tried implementing it with for instead of ForEach. But an error aros...

0

I wonder if there's a simple way to make visible the activity indicator used by the refresh control of a SwiftUI List? This would provide a consistent appearance of a refreshing UI, regardless of h...

1

I am working on a SwiftUI project that pulls data from Firebase Firestore using Combine. Each user has the ability to create "Offers" in the app. In order to list their offers on their ac...
Lymphangial asked 28/9, 2021 at 17:50

1

Solved

I want to set a image header for list in swiftui. The effect I want is shown in the figure below: My code is as bellow: import SwiftUI struct ContentView: View { var body: some View { Navigatio...
Euraeurasia asked 22/7, 2022 at 1:1

1

Solved

I want to set a image header for list in swiftui. The effect I want is shown in the figure below: However, I can not remove padding in this image row. My code is as bellow: import SwiftUI struct ...
Reganregard asked 21/7, 2022 at 14:40

1

Solved

I'm having some trouble getting my head around conforming existential variables in Swift 5.7+ with the new "existential any" changes. Since Animal here will always conform to Hashable, I ...
Dressy asked 19/7, 2022 at 1:12

0

If I change the row background color, then the default grey selection when I tap on the row disappears. Is it possible to bring it back? Or do I have to add a custom overlay/manually change the col...
Puppy asked 18/7, 2022 at 9:23

0

Given: SectionView as a row representation in a List Swipe actions associated with this view Tappable Image as a part of the same view Required: Display swipe actions on Image tap, not only using...
Gerick asked 19/5, 2022 at 10:14

2

When I'm long-pressing on a button in list row, all of context menus for all buttons are shown. It looks like the whole list row is selected. How can I make it so that the context menu is shown onl...
Foliage asked 14/4, 2020 at 14:25

© 2022 - 2025 — McMap. All rights reserved.