• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone] Zero opacity causes UIView to go numb
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] Zero opacity causes UIView to go numb


  • Subject: [iPhone] Zero opacity causes UIView to go numb
  • From: Sebastian Morsch <email@hidden>
  • Date: Thu, 23 Jul 2009 16:49:47 +0200

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 (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


  • Follow-Ups:
    • Re: [iPhone] Zero opacity causes UIView to go numb
      • From: "Hank Heijink (Mailinglists)" <email@hidden>
  • Prev by Date: Re: iPhone List? - few questions
  • Next by Date: NSTableView is not updated on [reloadData]
  • Previous by thread: Re: Screen Saver test button click notification
  • Next by thread: Re: [iPhone] Zero opacity causes UIView to go numb
  • Index(es):
    • Date
    • Thread