Skip to content

Instantly share code, notes, and snippets.

@nickjs
Created September 29, 2008 18:29
Show Gist options
  • Save nickjs/13641 to your computer and use it in GitHub Desktop.
Save nickjs/13641 to your computer and use it in GitHub Desktop.
- (LEAnimation)initWithView:(CPView)aView property:(NSString)keyPath
{
self = [super initWithDuration:1.0 animationCurve:CPAnimationLinear];
if(self)
{
if([aView respondsToSelector:keyPath]){
_view = aView;
_getPath = keyPath;
_setPath = "set"+[[keyPath capitalizedString] substringToIndex:1]+[keyPath substringFromIndex:1]+":";
} else {
return null;
}
}
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment