View Full Version : class methods

Jul 28, 2008, 01:59 PM
I'm working with a CATiledLayer that has a class property called fadeDuration defined as:

+ (CFTimeInterval)fadeDuration;

How do I set the value of this. I realize it's a class property due to the + sign(as opposed to an instance variable).

I tried [CATiledLayer fadeDuration] = 0;

but that doesnt do anything


Jul 28, 2008, 03:15 PM
I'd say create a subclass and override the method. For example:

@interface CustomTiledLayer : CATiledLayer

@implementation CustomTiledLayer
+ (CFTimeInterval)fadeDuration { return 0.1; }