-1

I set the Core Animation Layer of NSButton in the xib file, like below: enter image description here

I'd like to know how to set it in the code.

Thanks!

Community
  • 1
  • 1
scorpiozj
  • 2,687
  • 5
  • 34
  • 60

1 Answers1

0

Take a looks at the description of setWantsLayer. It explains what to do.

You either want to call setWantsLayer:TRUE, or first call setLayer, then setWantsLayer:TRUE, depending on what you want to do with layers.

Duncan C
  • 128,072
  • 22
  • 173
  • 272
  • setWantsLayer: is not I want as I tried it. Could you describe more about how to setLayer? Should I create a new layer? – scorpiozj Aug 08 '12 at 01:32