Last active
October 1, 2022 09:18
-
-
Save csknns/afdb9dc3a76bb2a52017564b611ba375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hold the filter and the closure that updates its value | |
var filtersAndValueUpdaters: [ (Filter, ((Float, Int) -> Void)) ] = [] | |
// The selected filter has also the closure that updates its value | |
var selectedfilter: (Filter, (Float, Int) -> Void) | |
let filterA = FilterA() | |
filtersAndValueUpdaters.append((filterA, { [weak filterA] value, _ in | |
filterA?.param = value | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment