CombineViewModel
CombineViewModel copied to clipboard
An implementation of the Model-View-ViewModel (MVVM) pattern using Combine.
The project builds without issue, but when I try **archiving** the project using Xcode 12.5, I'm getting a segmentation fault. I am able to reproduce this both in a project...
This would provide a nice dual to `objectWillChange` and improve discoverability of the functionality. The implementation practically writes itself: ```swift extension ObservableObject { public var objectDidChange: ObservableObjectPublisher { observe(on: .main)...
As discussed in Slack: I guess my question is why this is called ViewModel instead of (UI?)ObservedObject 🙂 > `UIObservedObject` could work I guess (and would sidestep the “what’s the...
Not sure it makes sense, but it would be really nice to be able to use all those in older OS'es.
Because we rely on the "enclosing self" subscript to hook into a view controller's `viewDidLoad` method, we can't use the more obvious syntax: ```swift @ViewModel var counter = Counter() ```...
Instead of ```swift @ViewModel private var counter: Counter required init?(coder: NSCoder) { super.init(coder: coder) self.counter = Counter() } ``` a simple: ```swift @ViewModel private var counter = Counter() ``` It...