Objective-C
UIButton *tmpButton = (UIButton *)[self.view viewWithTag:tmpTag];
How to make this in Swift ?
In Swift, this would look like this:
var tmpButton = self.view.viewWithTag(tmpTag) as? UIButton
It is more or less a direct translation, except the cast is at the other end of the expression.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With