• 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: Animated subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Animated subviews


  • Subject: Re: Animated subviews
  • From: DKJ <email@hidden>
  • Date: Sun, 23 Nov 2008 10:42:09 -0800

Despite the compiler warning, this code:

	CGRect cr = [[self.layer presentationLayer] frame];
	NSLog( @"%.1f %.1f", CGRectGetMidX( cr ), CGRectGetMidY( cr ) );

gives me just what I hoped for. I have the animation delegate start a timer when the animation begins, and the timer calls the above code every 0.1 seconds. I get a nice list of updated centre positions for the subview as it moves through the superview.

So now I guess I should make the superview controller the delegate for the animations in both the subviews, and have it test their changing positions however-often is needed to get the desired result.

Thanks again for the advice; it seems to be exactly what I needed!

dkj


On 23-Nov-08, at 9:54 , DKJ wrote:

Now I'm getting a very odd result. In the code for a UIView I have this:

	CALayer *theLayer = self.layer;
	id pLayer = [theLayer presentationLayer];

The first line is fine, but for the second I get a compiler warning:

	no '-presentationLayer' method found

I'm looking at the CALayer docs, which has this:

	- (id)presentationLayer

	Return Value
	A layer instance representing the current presentation layer.

Any idea what's going on? (I'm also puzzled why this method would return an id.)

_______________________________________________

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


References: 
 >Animated subviews (From: DKJ <email@hidden>)
 >Re: Animated subviews (From: Wyatt Webb <email@hidden>)
 >Re: Animated subviews (From: DKJ <email@hidden>)

  • Prev by Date: Re: Magnify anything on the screen?
  • Next by Date: Automatic file numbering ideas...
  • Previous by thread: Re: Animated subviews
  • Next by thread: Re: Animated subviews
  • Index(es):
    • Date
    • Thread