r/swift•
chuchuboat

Anyone know of a good Swift 'Cheat Sheet' reference guide?

I've found a few such as http://iswift.org/cookbook/declare-a-function-with-arguments, which is quite useful. But I'm looking for something that has more unique examples that could be useful in implementing into your code. For example stuff like disabling a button after its been pressed.

@IBAction func pressButton(sender: AnyObject) {
            var disableMyButton = sender as? UIButton
                disableMyButton.enabled = false

Or the NSTimer for adding a delay to your IBActions etc. Thanks!

Posted May 29, 2016, 8:28 PM UTC

93
Loading comments…