Cocoa 中的选项卡样式
我是 Cocoa 编程的新手,现在我正在设计一个带有多个选项卡的应用程序。不幸的是,我不喜欢标准选项卡视图的样式,但是我很幸运找到了我正在寻找的具有选项卡样式的东西。屏幕截图可以在这里找到: http://investscope.com/images/scr1.png 问题是如何实现(从哪里开始)选项卡,如链接中的图片所示。 (我指的是图片底部的选项卡(摘要、假期、实现等))
提前致谢。
此致, 克罗科迪洛维
I'm new in the Cocoa programming and now I'm designing an application with several tabs. Unfortunately I don't like the style of the standard tabs view, however I was lucky to find something with tabs style I'm looking for. Screenshot can be found here:
http://investoscope.com/images/scr1.png
And the question is how to implement (where to start) tabs as in the picture from the link. (I mean tabs at the bottom of the picture (Summary, Holidays, Realized, etc.))
Thanks in advance.
Best Regards,
Krokodylowy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这绝对是习俗。我可能会首先子类化
NSTabViewItem
并覆盖drawRect:
来执行选项卡的自定义绘制。That's definitely custom. I'd probably start by subclassing
NSTabViewItem
and overridingdrawRect:
to do the custom drawing of the tabs.我尝试了上面的链接,它在 10.6.x 下运行良好
(事实上,这不是一个非常漂亮的控件,而是获得您想要的东西的一个很好的起点)
此链接无需任何代码更改即可工作:
I tried the link above and it works fine under 10.6.x
(In fact is't a reeeealy nice looking control and is a good starting point to get what you want)
This link worked without any code changes:
看看 PSMTabBarControl
http://www.positivespinmedia.com/dev/PSMTabBarControl.html
创建者尚未更新,因此要获得可在 10.6 上编译的内容,您需要进行一些谷歌搜索。如果您找不到它,请告诉我,我会为您找到链接。
Take a look at PSMTabBarControl
http://www.positivespinmedia.com/dev/PSMTabBarControl.html
The creator hasn't updated, so to get something compilable on 10.6 you'll need to google around a bit. If you can't find it, let me know and I'll find you a link.
看看 ENTabBarView
https://github.com/aaron-elkins/ENTabBarView
它是开源的是我写的。
Take a look at ENTabBarView
https://github.com/aaron-elkins/ENTabBarView
It's open source and written by me.