I\'m trying to learn how to use and implement CALayer in a Mac Objective-C application, but I can\'t seem to probably do the most basic thing - add a new layer and
Put this out of the drawRect. I normally put my layer setup in either the init method or the viewDidLoad.
Otherwise anytime the view is drawn a new layer is added and allocated. Also I've never used the [layer display] line before. The docs actually tell you not to call this method directly.