• 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
Funky behavior with layer-backed views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Funky behavior with layer-backed views


  • Subject: Funky behavior with layer-backed views
  • From: Randall Meadows <email@hidden>
  • Date: Fri, 12 Dec 2008 16:37:32 -0700

In this one window I have, I have 2 views and 2 buttons, all living in the same parent view (there's more than just that, but these are the relevant bits).

The Notes button shows/hides the notes view, and the Info button shows/ hides the MoreInfo view. I have turned on "Wants Core Animation Layer" for the parent view containing these items, so that I can animate the showing/hiding of them as appropriate.

When the Info button is pressed to show the MoreInfo view, I need to hide the Notes button, and I also do this by animating the opacity of the Notes button to 0 and then actually hide it, therefore I need the "Wants Core Animation Layer" turned on for the parent view. This seems to have a bad side effect: The z-ordering of the Notes button and the MoreInfo view appears to be swapped, but only "kind of".

What happened before I added this animating was, the Info button is pressed and the MoreInfo view was shown; the MoreInfo view happened to cover the majority of the window, and in fact occupied the space of the Info button, but it was behind the button so that the button was seen overtop the MoreInfo view.

Now that I've turned the CA layer on, when the MoreInfo view is shown, it is now covered up *visually* by the MoreInfo view, but the Info button is still clickable, even though it cannot be seen.

If I stretch the window wider, the size of the MoreInfo view stays the same, but the button is bound to the corner, so it moves out from "under" the MoreInfo view. So it's being drawn, but being drawn under the MoreInfo view, but it gets the clicks instead of the MoreInfo view.

Does that explanation of what's happening make sense? I tried adding "[showInfoBtn display];" in the animationDidStop:finished: delegate method, to try to force the Info button to redraw itself in the correct location, but that had no effect.

What is it about CA layering that is causing this, and how do I get my button (which is on top of everything) to actually be *drawn* on top of everything.


Thanks! randy

_______________________________________________

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


  • Prev by Date: Re: Announce the time every 30 minutes
  • Next by Date: Re: NSBitmapImageRep orientation?
  • Previous by thread: Re: NSBitmapImageRep orientation?
  • Next by thread: open package installer in bundle resources directory not working
  • Index(es):
    • Date
    • Thread