mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-29 05:31:59 +02:00
Add projects
This commit is contained in:
21
Examples/UINote/SwiftUINote/Models/UserData.swift
Executable file
21
Examples/UINote/SwiftUINote/Models/UserData.swift
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// UserData.swift
|
||||
// SwiftUINote
|
||||
//
|
||||
// Created by chanju Jeon on 05/06/2019.
|
||||
// Copyright © 2019 we'd. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
|
||||
final class UserData: BindableObject {
|
||||
let didChange = PassthroughSubject<UserData, Never>()
|
||||
|
||||
var notes = NoteData.shared.notes {
|
||||
didSet {
|
||||
didChange.send(self)
|
||||
NoteData.shared.notes = notes
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user