Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.05 KB

File metadata and controls

18 lines (12 loc) · 1.05 KB

Say you have multiple sheets you want to display on a single screen. Let's say you don't want to have a bunch of different .sheet modifiers on your view. Here's a better idea.

Quick Tutorial

Step 1

Create some sheet views

Step 2

Create an enum containing each type of sheet you have avaiable. Conform to Identifiable and Hashable

Step 3

Create a sheet view with a switch statement that iterates over the enum of sheets and returns the appropriate view

Step 4

You'll need this cool extension on Binding

Step 5

Put it all together in the ContentView