2008 11 28Core Animation in JSCocoa
I was asked some sample code of what can be done quickly in JSCocoa, so here's a quick Core Animation sample :
NOTE this is done on a Mac, not on an iPhone, which doesn't handle (yet ?) Core Image.
- This is assuming you have a Core Animation view, a view on which you set
myView.wantsLayer = true
- The layer is created and added to an existing
parentLayer
(which can just bemyView.layer
) -
masksToBounds
clips the layer content to its rounded corners. Without it, the image will overflow the rounded corners - I'm not releasing the color created with
CGColorCreateGenericRGB
— hey, it's quick code :)