Pass an array of types as function param and check if a concrete object inherits any type from array in Swift?
In my particular case I need to get the topmost view controller but avoid view controllers of some types like UIAlertController
. I took code from here: