mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-11-27 19:02:55 +01:00
@Published and syntheised objectWillChange, see https://sarunw.com/posts/swiftui-changes-in-xcode-11-beta-5
This commit is contained in:
1 parent
7de7e1e47b
commit
0dcb82716d
8 files changed
+18
-105
No files matched your search
+2
-12
@@ -9,17 +9,7 @@ import Combine
|
||||
import SwiftUI
|
||||
|
||||
final class UserData: ObservableObject {
|
||||
let objectWillChange = PassthroughSubject<UserData, Never>()
|
||||
|
||||
var showFavoritesOnly = false {
|
||||
didSet {
|
||||
objectWillChange.send(self)
|
||||
}
|
||||
}
|
||||
@Published var showFavoritesOnly = false
|
||||
|
||||
var landmarks = landmarkData {
|
||||
didSet {
|
||||
objectWillChange.send(self)
|
||||
}
|
||||
}
|
||||
@Published var landmarks = landmarkData
|
||||
}
|
||||
Reference in new issue
Block a user