Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Overview

🗂 SwiftUICardStack

Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Contents

Supported Platforms

You can use the CardStack SwiftUI view in the following platforms:

  • macOS 10.12+ 🖥
  • iOS 14.0+ 📱
  • tvOS 14.0+ 📺

Package

For your XCode Package

File > Swift Packages > Add Package Dependency: https://github.com/p-larson/SwiftUICardStack

Select main branch then click done.

For Swift Packages

Add a dependency in your Package.swift

.package(url: "https://github.com/p-larson/SwiftUICardStack", branch: "main")

Usage

Simple example

CardStack(
    items: cards,
    selection: $selectedCard,
    builder: CardView.init(model:)
)
.sheet(item: $selectedCard) { card in
    VStack {
        Text(card.name)
        Text(card.description)
        Text(card.id)
        Text(card.someMoreDetailedInformation())
    }
}

See Full Example Usage @ SwiftUICardStack/Example

Extra

My Favorite Line of Code from the Package 💕

Line 17 of Sources/SwiftUICardStack/CardStackSource.swift

private(set) lazy var views: Array = items.map(builder).map(\.eraseToAnyView)

Why this is my favorite

I use the power of KeyPaths to type erase the data set in a short and sweet one liner!

See View#eraseToAnyView

License

Open Source MIT License, aka: use how you please 😎

You might also like...
Turn your Swift data model into a working CRUD app.
Turn your Swift data model into a working CRUD app.

Model2App is a simple library that lets you quickly generate a CRUD iOS app based on just a data model defined in Swift. (CRUD - Create Read Update De

🛠 A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern.
🛠 A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern.

Model-View-Presenter template A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern. This

SandboxKit - Framework that makes it easy to launch a single Scene of your application

SandboxKit This framework makes debugging more efficient in your application. Sandbox is the name of a structure that improves the efficiency of debug

🚀 Create, maintain, and interact with Xcode projects at scale
🚀 Create, maintain, and interact with Xcode projects at scale

What's Tuist 🕺 Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects. It's open source and written in Swift

Create an app using VIPER architecture
Create an app using VIPER architecture

How not to get confused with VIPER Implementation This is a demo app to share in swift study group using VIPER Architechture When using VIPER Architec

Create dynamic wallpapers for macOS
Create dynamic wallpapers for macOS

Equinox Create macOS native wallpapers Description Equinox is an application that allows you to create macOS native wallpapers. Starting macOS Mojave

Goal: Create an iOS app with two views, MainViewController and DetailViewController
Goal: Create an iOS app with two views, MainViewController and DetailViewController

Goal: Create an iOS app with two views, MainViewController and DetailViewController

A simple composition framework to create transformations that are either unidirectional or bidirectional

c is a simple composition framework. You have the ability to create transformations that are either unidirectional or bidirectional. There is also a cache that values can be set and resolved.

Lightweight app to view your WoT (BB, Blitz) stats (XVM based)
Lightweight app to view your WoT (BB, Blitz) stats (XVM based)

KTTC Lite Приложение для танкистов, следящих за своей статистикой! Функционал Базовая статистика аккаунта WoT, WoT Blitz Расширенная статистика XVM (W

Releases(1.0.0)
Owner
Peter Larson
// iOS Cowboy
Peter Larson
SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

Christopher Prince 12 Feb 10, 2022
Docker images for Swift on Raspberry Pi and other ARM devices from balena's base images.

Swift on Balena Welcome to Swift on Balena – a set of Docker images for Swift on Raspberry Pi and other ARM devices. These images are based on balena'

Will Lisac 173 Dec 5, 2022
Mybook swiftui - A Facebook UI Clone with some capabilities like like/unlike, comment, scroll, show stories etc

mybook_swiftui ?? Trying to create a Facebook UI Clone with some capabilities li

mogolAyberk 1 Apr 16, 2022
TagKit makes it easy to create tag-based apps in SwiftUI.

About TagKit TagKit makes it easy to work with tags in Swift and SwiftUI. The result can look like this or completely different: Tags and tag views ca

Daniel Saidi 18 Dec 23, 2022
How to develop an iOS 14 application with SwiftUI 2.0 framework. How to create an Onboarding Screen with Page Tab View

Ama-Fruits USER INTERFACE AND USER EXPERIENCE APP DESIGN How to develop an iOS 14 application with SwiftUI 2.0 framework. How to create an Onboarding

Noye Samuel 1 Dec 11, 2021
A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.

Lorem Introducing Lorem, a placeholder generator library for iOS to help you rapidly prototype, build and test your iOS applications. By leveraging Sw

Thirdfort Limited 10 Dec 5, 2022
A Simple way help you drop or drag your source (like UIImage) between different App.

A Simple way help you drop or drag your source (like UIImage) between different App.

逸风 13 Nov 24, 2022
Flutter package for detecting NSFW images and videos using native implementation

Flutter NSFW 1- Download, tflite modle and put it in assets folder 2 - Add the path of the tfliet to pubspec.yaml 3 - Read the file using path_provide

Syed Ahsan Ali 8 Oct 16, 2022
An example implementation of using a native iOS Notification Service Extension (to display images in remote push notification) in Titanium.

Titanium iOS Notification Service Extension An example implementation of using a native iOS Notification Service Extension (to display images in remot

Hans Knöchel 8 Nov 21, 2022
UIEnvironment - A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit app.

A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit view hierarchy. Overview D

Łukasz Śliwiński 15 Dec 5, 2022