Created
October 28, 2022 17:50
-
-
Save borisdipner/fa0f1bd02d1b370cb365c6273b09c991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct OnboardingCard: Codable, Identifiable, Equatable { | |
var id: UUID | |
var title: String | |
var subTitle: String | |
var image: String | |
} | |
class OnboardingCardsData: ObservableObject { | |
let cards: [OnboardingCard] | |
var primary: OnboardingCard { | |
cards.first! | |
} | |
init() { | |
cards = Bundle.main.decode([OnboardingCard].self, from: "cards.json") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment