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.
You can also use a where clause
where
for button in view.subviews where button is UIButton { ... }