是否有标准的,已记录在案的开发模式来创建类似于iTunes,iCal,iPhoto等的UI布局? [英] Is there a standard, documented, development pattern to create UI layouts similar to iTunes, iCal, iPhoto, etc?

查看:79
本文介绍了是否有标准的,已记录在案的开发模式来创建类似于iTunes,iCal,iPhoto等的UI布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是可可开发的新手,我正在尝试使用我认为是由iTunes,iCal,iPhoto,Billings,1Password,Numbers,Delicious Library等应用程序共享的标准布局来创建UI布局。这种典型的布局可以描述如下:

I am new to Cocoa development and I am trying to create UI layouts using what I consider to be the "standard" layout that is shared by apps like iTunes, iCal, iPhoto, Billings, 1Password, Numbers, Delicious Library, etcetera. This typical layout can be described as follows:


  • 屏幕左侧的库面板,通常用于发现层次结构。该面板通常覆盖大约四分之一的水平空间。

  • 库面板右侧的主面板,大多数UI交互都在该面板上进行。这将占用剩余的水平空间,在这里我们可以找到诸如iCal中的每月日历视图或iTunes中的专辑封面和播放列表之类的内容。

  • 屏幕左下角的某些实用程序面板,通常用于其他选项。

是否有一个文档化的模式可以显示有关如何连接这些类型的布局的View和Controller类的最佳实践?例如,要使用多少个ViewController,是否使用基于NSDocument的方法是否有意义,一些常见的陷阱,等等?这种布局非常普遍,令我惊讶的是似乎没有很好的参考。

Is there a documented pattern that will show best practices on how to "wire" the View and Controller classes for these types of layouts? For instances, how many ViewControllers to use, whether or not using an NSDocument-based approach makes sense, some common pitfalls, etcetera? This layout is so prevalent, that I am surprised that there doesn't seem to be any good reference on it.

更新:
我忘了提到我可以访问Apple Developer网站,尽管可以找到库参考对于Cocoa中的不同类别,我似乎找不到如何在我描述的布局中将所有元素整合在一起的良好参考。

Update: I forgot to mention that I have access to the Apple Developer site, and while I can find the library reference for the different classes in Cocoa, I cannot seem to find a good reference for how to bring it all together in the layout I describe.

像Aaron Hillegass这样的书和其他一些书,对于学习有关Cocoa的基础知识并创建简单的界面(在连接到NSDocument的视图上布置一些控件)非常有用。 ,但不能很好地指导您介绍我描述的UI布局。

Books like Aaron Hillegass' and others out there are great to learn the basics on Cocoa and creating simple interfaces (a few controls laid out on an view connected to an NSDocument), but not so great at guiding you to the UI layout I describe.

谢谢。

推荐答案

左侧的分层视图称为源视图,通常可以使用 NSOutlineView 类创建此视图。

The hierarchical view on the left is called a Source View and you would normally create this with the NSOutlineView class.

具有看一下苹果的 SourceView 示例代码。它实现的源视图与Finder和其他地方的视图非常相似,应该可以为您提供一个很好的开端。

Have a look at Apple's SourceView sample code. It implements a source view very similar to the one in the Finder and elsewhere and should give you a big head start.

这篇关于是否有标准的,已记录在案的开发模式来创建类似于iTunes,iCal,iPhoto等的UI布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆