开发者

How to add left/bottom/right panes to Mac application as in XCode?

XCode 4 (but also iTunes and other Mac apps) provide side or bottom bars that can be shown or hidden with a smooth animation a开发者_如何学JAVAs the user presses a button. How can I obtain a similar effect in my applications?


You can use NSSplitView to do that. You can have more than 2 subviews in a split view (left|center|right) and you can build a kind of hierarchy for the different bars (center consists of top and lower split views).

The show/hide effect is not built in, though. But you should be able to use the animator to do that. Most certainly you can also define animations for hiding a view.

You could also use the BWSplitView of http://brandonwalkin.com/bwtoolkit/ where the show/hide animation is already included.


You could also consider subclassing NSViewAnimation, which I believe Xcode uses in a number of places to achieve its fancy animation effects.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜