Empty ListView for empty state
  • July 22, 2025

EmptyList – List(SwiftUI) supports displaying Empty ListView for empty state

Usage


EmptyList(countries, listRowView: { country in
Text(country.name)
}, emptyListView: {
Text(“No countries”) // View displayed when the items collection isEmpty
})

// Source data for List. Source item must implement Identifiable protocol
struct Country: Identifiable {
let id: UUID
let name: String
}

// Source data items for List
let countries: [Country] = [
Country(id: UUID(), name: “Poland”),
Country(id: UUID(), name: “Germany”)
/// Others countries
]

Example


 

Look here if need more details

Requirements


 

  • Xcode 11+
  • Swift 5.2+

And same requirements how to use SwiftUI. Availability:

  • iOS 13.0+
  • macOS 10.15+
  • Mac Catalyst 13.0+
  • tvOS 13.0+
  • watchOS 6.0+

Installation


 

Feel free copy-paste EmptyList to your project or can install via CocoaPods. For installation through CocoaPods add the following line to your Podfile:

pod ‘EmptyList’, ‘~> 1.0.0’

GitHub


View Github

#tableview
YOU MIGHT ALSO LIKE...
SwiftSpeech

Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSpeech Examples Features Installation Getting Started ...

SwiftUIValueSlider

Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 14.0 Installation ...

Sliders

Sliders is a compilation of all my stylable drag based SwiftUI components. It provides a variety of unique controls as well ...

SlidingRuler

SlidingRuler is a Swift package containing a SwiftUI control that acts like an linear infinite slider or a finite, more precise ...

Skeletonui

SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and ...