Xcode for Mac 编程..有“标准”吗?模板?
我注意到 Mail.app、iTunes 甚至 Finder 有一个类似的模板,有多个列,但通常是左列包含“文件夹”和“文件”。这是一种标准模板,我可以使用它以避免重新发明轮子吗?
谢谢!!
I notice that Mail.app, iTunes and even Finder have a similar template, with a various columns, but often, a left Column with "folders" and "files". Is this a sort of standard template, that I can use so as to not reinvent the wheel?
Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,Apple 不提供类似于查找器窗口等的控件,尽管这是一个常见请求,并且您可能希望在 http://bugreport.apple.com 提出此请求...这将有助于推动他们提供这样的标准控件。
然而,有几个控件实现了您可能想要查看的各个方面,例如 NSTableView、NSOutlineView、NSCollectionView 和 NSCollectionView。 IKImageBrowser。
不过,要获得你想要的一切,你可能必须重新发明轮子。我通常发现这些控件如果不能提供您开箱即用所需的一切,则很难自定义...但它们确实提供了很多开箱即用的功能。
No, Apple does not provide a control that acts like a finder window, etc., although it is a common request and you might want to file a bug report at http://bugreport.apple.com making this request...it would help push them along to provide such a standard control.
However, there are several controls that implement various aspects that you may want to take a look at like NSTableView, NSOutlineView, NSCollectionView & IKImageBrowser.
Although, to get everything you want, you may have to reinvent the wheel. I have generally found these control hard to customize if they do not provide everything you need out-of-the-box...but they do provide a lot out-of-the-box.
不,但您可以创建自己的模板,这样您只需重新发明轮子一次。
顺便说一句,您可以通过将两个文件从空 nib 复制到某些应用程序中来反编译 nib。
顺便说一句,如果你反编译 Finder 的笔尖,你会发现它们非常混乱,而且侧边栏位于单独的笔尖中。我猜它们是通过编程方式组合的。
顺便说一下,iTunes 使用 Carbon 笔尖,而 Finder 和 Mail 使用 Cocoa 笔尖。
顺便说一下,Mail 很快就会被一个布局完全不同的新版本所取代。
Nopes, but you can create your own templates so you only have to reinvent the wheel once.
By the way, you can decompile nibs from some applications by copying two files from an empty nib into them.
By the way, if you decompile Finder's nibs, you see that they are very messy and the sidebar is in a separate nib. I guess they are combined programmatically.
By the way, iTunes uses Carbon nibs while Finder and Mail use Cocoa nibs.
By the way, Mail is soon to be replaced with a new version that has a totally different lay-out.