Search code examples
cocoamacostextcore-animation

Editable CATextLayer?


I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas?

I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-(

I target Mac OS X 10.5 with Objective-C 2.0 and Garbage Collection.

Any help or pointers would be greatly appreciated. Thanks in advance!!


Solution

  • I think your approach using an editable NSTextFieldCell is the right way to go. It's not a trivial task, but you can do it.