-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleListModel.swift
More file actions
30 lines (25 loc) · 944 Bytes
/
ExampleListModel.swift
File metadata and controls
30 lines (25 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// ExampleListModel.swift
// SSSwiftUIAnimations
//
// Created by Mansi Prajapati on 20/05/24.
//
import SwiftUI
class ExampleListModel: Identifiable {
// MARK: - Variables
var id = UUID()
var rowTitle: String
var destinationView: AnyView
// MARK: - init
init(rowTitle: String, destinationView: AnyView) {
self.rowTitle = rowTitle
self.destinationView = destinationView
}
// data for example row list
static let exampleList = [
ExampleListModel(rowTitle: "ProgressView", destinationView: AnyView(ExampleProgressView())),
ExampleListModel(rowTitle: "Arrow Left Right View", destinationView: AnyView(ExampleLRArrowView())),
ExampleListModel(rowTitle: "Water Progress View", destinationView: AnyView(ExampleWaterProgressView())),
ExampleListModel(rowTitle: "StickAnimationView", destinationView: AnyView(ExampleSticksAnimations()))
]
}