I have this for-in loop:
for button in view.subviews { }
Now I want button to be cast into a custom class so I can use its properties.
This option is more secure:
for case let button as AClass in view.subviews { }
or swifty way:
view.subviews .compactMap { $0 as AClass } .forEach { .... }