iZettle / Flow

Flow is a Swift library for working with asynchronous flows and life cycles
MIT License
232 stars 14 forks source link

Fix crash when using `signal(for:)` on UIVisualEffectViews #105

Open sampettersson opened 4 years ago

sampettersson commented 4 years ago

signal(for: \.keyPath) under the hood adds a subview called CallbackerView this crashes when using it on a UIVisualEffectView as it has an assertion that you are not adding subviews to it directly but instead to it's contentView.

This PR checks if the view in question is a UIVisualEffectView and then proceeds to add the CallbackerView to the contentView instead.