Re: Problem using UIGestureRecognizer
Re: Problem using UIGestureRecognizer
- Subject: Re: Problem using UIGestureRecognizer
- From: Quincey Morris <email@hidden>
- Date: Mon, 06 Aug 2012 16:46:51 -0700
On Aug 6, 2012, at 16:11 , Laurent Daudelin <email@hidden> wrote:
> I found the problem after poking some more in Google. It is apparently a bug in UIKit. To fix it, I created a strong property in my controller connected to the UIGestureRecognizer and now, no more crash! So, the gesture recognizer, if nobody retains it, will be released without telling anyone, causing a random crash.
It's weird that "gestureRecognizers" shows up in IB at all. There's actually a syntax for this (IBOutletCollection), but I'd never heard of it until you brought up the subject and I did some searching.
Given that "gestureRecognizers" is not declared with this syntax, its appearance in IB seems like a bug -- it doesn't appear to be intended for as an outlet. (But what do I know about it -- maybe it is.)
Also, "gestureRecognizers" is declared "copy", which might have something to do with why the memory management gets messed up when nib loading tries to treat it as an outlet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden