I'd like to remove all subviews of my label like so:
label.subviews.map { $0.removeFromSuperview() }
This used to work in Xcode 6. But in Xcode 7 I get the following warning:
Result of call to 'map' is unused
This warning doesn't make sense. How can I suppress it?
UPDATE: I got this to work by doing the following, however, I'd like to keep a functional programming style and stick with map { }. This should also work.
label.subviews.forEach { $0.removeFromSuperview() }