Hi,

I *KNOW* this must be something absolutely stupid I'm missing, but I'm stuck with this:

I have an UIView that's supposed to display an explanatory overlay image whenever it's touched. When the user lifts the finger, the overlay should fade away. To accomplish this I do the following Inside my OverlayView's init method:

self.layer.contents = (id)[UIImage imageNamed:@"overlay.png"] CGImage];
self.layer.opacity = 0.0;

and then, inside the touchBegan: and touchEnded: methods I set the opacity to 1.0 and 0.0 respectively.

Now, this doesn't work at all, the view doesn't receive the touchBegan: and touchEnded: methods. But everything works fine if I set the opacity to 0.1 instead of 0.0!! And for instance, when I do this:

1. set opacity to 0.1 in the init call...
2. set opacity to 1.0 in the touchBegan call...
3. set opacity to 0.0 (!!!) in the touchEnded call...

all subsequent touches are ignored, touchBegan:, touchEnded:, etc. are never called again.


Any help on this is very very much appreciated!
Thanks, Sebastian

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to