Re: NSTextField as a CALayer
Subject : Re: NSTextField as a CALayer
From: Michel Schinz <email@hidden >
Date: Mon, 1 Dec 2008 20:05:52 +0100
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=JcgqWwQCDHcg0Kos+Kq1za7KaPH7sJSJ8PYPbIjcmyE=; b=b1xoJNFU2viV5feJYJKcmAm+Oq+lwX7H4ELzeaP7XaUezF14rYQp+sIlBBeIaHssqL tXgP8cU5pzg/RZBtOVKe4w2enF6kCNmp7e7BmC8oB9EFTzziYCEAvsfYoL3E46vFNHpF X9Yf2/gjypNke9xHteR9iD6GWwFuB1wfmU1WE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=KqbKOTRurHjC1Yuh0LDKqoVBDkRc4YJFyJ/7DAbXRxg6djHuauuOnRNg3wYY+yXtap MRZiOigWI/ah6mT7rAqVNmqgeMv1aNCxq4O65mIdkCqWc1zJjozhQpfrZyPk9La+8X5W NnMBJjVJEKmt9ImOiAKtCfUChV41MZA60N/xw=
Le 1 déc. 08 à 07:45, Scott Anguish a écrit :
No, you can't do this.
Core Animation is designed for easy animation, but not so you can
freely mix views and layers like this.
you could probably do what you want by doing your current CALayer
drawing into an NSView, and then add the textfield as a subview of
that view.. then turn on layer backing for the parent NSView.
Indeed, that's what I personally do in my application, and it works
well with some minor gotchas, one of which was explained to me by the
always-helpful David Duncan in the following thread (which the OP
might find worth reading):
http://www.cocoabuilder.com/archive/message/cocoa/2008/11/14/222642
Michel._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.