When you create an outlet for a control by Ctrl-dragging in Interface Builder it usually suggests to make the outlet weak.
But if you create an outlet for a gesture recognizer the suggestion is to make it strong. I am curious what is the reason behind of this, what is wrong with making gesture recognizer outlets weak too?
ref: http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=5126
From ios 5.0 it does not retain the gesture recognizers when added to a view controller.
By making strong properties and connecting them to the gesture recognizers, you can ensure that they stay alive otherwise the app will crash.
Credit to Ray Wenderlich team member Hollance.
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