开发者

Editable CATextLayer?

开发者 https://www.devze.com 2022-12-25 12:48 出处:网络
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 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!!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消