How to accomplish this splitter effect in code?
This comes from Dictionary APP in 10.7 Lion. Is this a NSShadow i开发者_开发技巧n a NSSplitView? I'd appreciate any advice, thanks.
Thanks, Li Fumin, for reminding me this was one of those visual effects I wanted to solve. :-) here's some sample code I posted just a bit ago. Enjoy!
Inspecting it with F-Script shows that it’s a custom split view (DSIndexSplitView
) with a custom table view (DSIndexTableView
) in the right column – nothing very surprising. The shadow is part of the table view rather than the splitter (which on further consideration can also be seen by the fact that text in the table view can draw over it).
I’d guess it’s either a gradient or an NSShadow drawn into the table view, before passing off to the superclass to render the cells.
精彩评论