mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-02-25 17:04:51 +01:00
26 lines
456 B
Swift
Executable File
26 lines
456 B
Swift
Executable File
/*
|
||
See LICENSE folder for this sample’s licensing information.
|
||
|
||
Abstract:
|
||
A model object that stores app data.
|
||
*/
|
||
|
||
import Combine
|
||
import SwiftUI
|
||
|
||
final class UserData: BindableObject {
|
||
let didChange = PassthroughSubject<UserData, Never>()
|
||
|
||
var showFavoritesOnly = false {
|
||
didSet {
|
||
didChange.send(self)
|
||
}
|
||
}
|
||
|
||
var landmarks = landmarkData {
|
||
didSet {
|
||
didChange.send(self)
|
||
}
|
||
}
|
||
}
|