[Warning] Publishing changes from within view updates is not allowed,
Closed this issue · 2 comments
nazar-41 commented
DominikButz commented
Hi,
thanks for bringing this to my attention. Actually, this warning also appears in the MinimizableViewExample project. The reason is that the view updating logic happens inside the "drag updating" closure.
What you can try is the following: move the updating logic from the dragUpdating closure to the dragOnChanged-closure as shown below. The warning does not seem to appear any more if you use the dragOnChanged-closure instead, at least not in the example project. I hope it helps.
dragUpdating: { (value, state, _) in
}, dragOnChanged: { (value) in
self.dragUpdated(value: value)
},
nazar-41 commented
fixed, thank!