Type casting in for-in loop
For Swift 2 and later: Swift 2 adds case patterns to for loops, which makes it even easier and safer to type cast in a for loop: for case let button as AClass in view.subviews { // do something with button } Why is this better than what you could do in Swift 1.2 and … Read more