• 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
Re: Layer Backed Views and CoreAnimation neither animate nor stay in place
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Layer Backed Views and CoreAnimation neither animate nor stay in place


  • Subject: Re: Layer Backed Views and CoreAnimation neither animate nor stay in place
  • From: Shripada Hebbar <email@hidden>
  • Date: Mon, 30 Jun 2008 12:00:50 +0530

Hi Chilton

You better do the addition of subviews and setting up the core animation stuff in the view's
awakeFromNib rather than its initWithFrame: method. Since the view is getting loaded from the nib, chances are
that your settings within initWithFrame get overridden by the settings in the nib as a part of nib loading process.
I am not sure if this is the reason though!.


HTH

Shripada

Message: 11
Date: Fri, 27 Jun 2008 05:56:25 -0700
From: Chilton Webb <email@hidden>
Subject: Layer Backed Views and CoreAnimation neither animate nor stay
	in place
To: email@hidden
Message-ID:
	<email@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I am absolutely confused regarding something simple in layer backed view animation, and it's been haunting me for many months now. So I have constructed a sample project that illustrates the 3 problems I run into most frequently. I'm hoping someone will point to some place in the docs I've missed, and explain why I'm having what I see as simple problems, so often.

Here's the completed, zipped sample project. It's 63k.
http://homepage.mac.com/chilton/.Public/SubViewDepthTest.zip


The symptoms:
(1) If I specify that I want anything other than the main view to have a layer, that view will instantly 'pop' to the foreground in the window. However, its actual view remains in the same place in the view hierarchy.


(2) If I set [self setWantsLayer:YES] anywhere except where it is currently uncommented, the animations don't work at all. The window performs the update instantly, and without animating it! This seems very wrong. I would expect that I could set it at the end of my initialization at least, after I've built up my other layers, so that the tree would populate correctly.

If I do that, no animation, but at least the view is replaced in the right stacking order.

(3) Even when everything else is working right, the first time I perform my animation method, the animation does not work. Instead, it quickly swaps out the old view with the new one, and displays it in the foreground, on top of all other views, even if all other views are layer backed. This is obviously *not* 'replacing' the view in the order I want. After that, it animates properly, but on top of the other views instead of behind them.

All I want is to animate the swapping out of the middle layer. What on Earth am I doing wrong?

The very simple sample project is above, and the two main classes used are below. The first does all the work, the second is just there to look pretty.

ANY SUGGESTIONS/CRITICISMS/COMMENTS GREATLY APPRECIATED!!!

Thank you,
-Chilton Webb




----------------------------------------------- Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________

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: Output of NSHTTPCookieStorage to NSTableView
  • Next by Date: Re: viewing method calls
  • Previous by thread: Re: [MEET] CocoaHeads Mac Developer Meetings
  • Next by thread: Alternative to NSDate's dateWithNaturalLanguageString: ?
  • Index(es):
    • Date
    • Thread