File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ class HybridRiveView : HybridRiveViewSpec {
2121
2222 // MARK: View Methods
2323 func bindViewModelInstance( viewModelInstance: ( any HybridViewModelInstanceSpec ) ) throws {
24- guard let hybridViewModelInstance = viewModelInstance as? HybridViewModelInstance else { return }
25- riveView? . bindViewModelInstance ( viewModelInstance: hybridViewModelInstance . viewModelInstance)
24+ guard let viewModelInstance = ( viewModelInstance as? HybridViewModelInstance ) ? . viewModelInstance else { return }
25+ riveView? . bindViewModelInstance ( viewModelInstance: viewModelInstance)
2626 }
2727 func play( ) throws { riveView? . play ( ) }
2828 func pause( ) throws { riveView? . pause ( ) }
Original file line number Diff line number Diff line change 11import RiveRuntime
22
33class HybridViewModelInstance : HybridViewModelInstanceSpec {
4- let viewModelInstance : RiveDataBindingViewModel . Instance
4+ let viewModelInstance : RiveDataBindingViewModel . Instance ?
55
66 init ( viewModelInstance: RiveDataBindingViewModel . Instance ) {
77 self . viewModelInstance = viewModelInstance
88 }
99
10+ override init ( ) {
11+ self . viewModelInstance = nil
12+ super. init ( )
13+ }
14+
1015 var name : String { " " }
1116}
You can’t perform that action at this time.
0 commit comments