Category "swiftui-list"

SwiftUI List is not showing any items

I want to use NavigationView together with the ScrollView, but I am not seeing List items. struct ContentView: View { var body: some View { Navigat

SwiftUI List inside ScrollView

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

SwiftUI: how to detect when List is scrolled? [closed]

I have a view with a search bar at the top and a SwiftUI List below. I need to detect when the List is scrolled so I can dismiss the search ba

Issue: SwiftUI Button in Toolbar does not respond with empty array in a ForEach loop

Issue: SwiftUI Button in Toolbar does not respond with empty array in a ForEach loop. (see attached code snippet) The viewModel.fetchAllContainer() function in

How to remove the default Navigation Bar space in SwiftUI NavigationView

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, y

Error deleting records from a SwiftUI List and Realm

Has anyone been able to successfully integrate Realm with SwiftUI, especially deleting records/rows from a SwiftUI List? I have tried a few different methods bu

Can’t pass data correctly to modal presentation using ForEach and CoreData in SwiftUI

Im trying to pass data of some object from list of objects to modal sheet, fetching data from CoreData. The problem is that no matter what object I click on i

How do I split a TextField into characters?

enter image description hereSo basically, I want to put the word(s) inputted into a TextField into an array, but also split the word(s) up into separate charact

SwiftUI List Button with Disclosure Indicator

I have a SwiftUI view that consists of a list with some items. Some of these are links to other screens (so I use NavigationLink to do this) and others are acti

How to apply a context menu to buttons in a SwiftUI list row?

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

SwiftUI List rows in Edit Mode do not allow Buttons actions/NavigationLinks to work?

SwiftUI List rows in Edit Mode do not allow Buttons actions to work I note (as well as NavigationLinks too). Is there a way to get this working? Goal - Want

SwiftUI - nested list

I'm trying to create a nested hierarchical list, so that for each task I can have subtasks like in iOS reminders app: First attempt was to embed another list

onDelete causing NSRangeException

In this app, there is a main screen (WorkoutScreen) that displays the contents of a list one at a time as it iterates through the list (current workout in a lis

SwiftUI dismissing view by setting NavigationLink tag to nil

I'm trying to implement the logic of programmatic view pop in SwiftUI I set a tag on the items and create a corresponding variable for the selected item, but wh

Make List Sections non-collapsible in SwiftUI when embedded into a NavigationView SwiftUI

When I embed a List grouped into Sections into a NavigationView the section headers become collapsible. I'd like to keep them non-collapsible, just like when th

How does one use NavigationLink isActive binding when working with List in SwiftUI?

The use case is pretty simple. I have a List of places, and each corresponds to a geofence. I need to enable navigation in that particular row(s) whose geofence

Position view relative to a another centered view

Hello SwiftUI community, I'm trying to do something that's probably easy to do but I'm stuck on it since hours. In a list, I'd like to have items composed of: