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

Re: CALayer defaultValueForKey


  • Subject: Re: CALayer defaultValueForKey
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 17 Feb 2009 14:59:09 -0500


On 15-Feb-09, at 6:07 PM, Gordon Apple wrote:

The docs are a clear a mud on this. What do you get from CALayer's
defaultValueForKey? Is this the same as one would expect from valueForKey
for an NSDictionary? The return type is "id".


" If this method returns nil a suitable “zero” default value for the
property is provided, based on the declared type of the key. For example, if
key is a CGSize object, a size of (0.0,0.0) is returned. For a CGRect an
empty rectangle is returned. For CGAffineTransform and CATransform3D, the
appropriate identity matrix is returned."


What does that mean? If you want a CGSize, does that mean you have to
use "sizeValue" on what is returned and convert it? Or "CGSizeValue"? But
wait, that's an iPhone SDK extension. Why isn't that in Cocoa?



Read the Core animation Programming Guide section on key-value coding extensions, it describes the wrapping for defaultValueForKey: and other similar methods.


also, there is an additional addendum like chapter that explains the default values for all the properties.


_______________________________________________

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: CALayer defaultValueForKey
      • From: Gordon Apple <email@hidden>
References: 
 >CALayer defaultValueForKey (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Still can't get NSFormatter working....
  • Next by Date: Re: sticky video/audio files in NSTextView with GC on
  • Previous by thread: Re: CALayer defaultValueForKey
  • Next by thread: Re: CALayer defaultValueForKey
  • Index(es):
    • Date
    • Thread