IBPlugin with Core Animated button.
IBPlugin with Core Animated button.
- Subject: IBPlugin with Core Animated button.
- From: Alexander Zvyagin <email@hidden>
- Date: Wed, 23 Jun 2010 12:51:51 +0400
- Acceptlanguage: en-US, ru-RU
- Thread-topic: IBPlugin with Core Animated button.
Hi, All!
I'm try to making Core Animated button encapsulated to Interface Builder Plugin.
>From inside, this button is NSControl created as layer-backed NSView and filled with CALayers.
All images of button states are draw by CALayers using mouseEvents (not by a simple drawRect): this are also critical to use Core Animations to render transitions between button states (pressed, hovered, etc).
But this control can't be binded from inside IB graphically because it hasn't the cell object.
Setting the +cellClass is not helpfull - NSControl needs the -setCell to be bindable from Interface Builder with mouse.
And if I add the NSCell or NSActionCell, it will corrupt the clicking behaviour: button is pressed by never unpressed back.
Q1: what is the right way to add a cell to the layer-backed controls (drawing itself via CALayers instead of simple drawRect provided by NSCells) ?
(or how to use NSCell with Core Animation to draw something instead of drawRect ?)
Q2: Interface Builder can't select the target verison of Mac OS X in a moment of NiB files creating from templates.
This break a compatibility with older versions of Mac OS X. Is the way to create NiB Plugin templates targeting for 10.5 as example but using 10.6 as development platform?
Alex.
_______________________________________________
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:
This email sent to email@hidden