Here is the code in my main file. It links to the login view so that when the person logs in then it will take them to the content view that has all the other stuff including the code that I have posted before.
// idAppApp.swift
// idApp
//
//
import SwiftUI
@main
struct idAppApp: App {
@StateObject private var wallet = Wallet()
var body: some Scene {
WindowGroup {
LoginView()
}
}
}
final class Wallet: ObservableObject {
@Published var cards = cardsData
var selectedCard: Card {
cards.first(where: { $0.isSelected})!
}
}
Topic:
Programming Languages
SubTopic:
Swift
Tags: