Yohst
Yohst

Reputation: 1902

Where can I find a source code skeleton for an OS X app using Apple's new UI?

Using Xcode it is easy to get create a skeleton app for OS X. However, Apple's skeleton code is rather old style with a single view and menu bar. I am looking for skeleton code / best practices which create an app that has the basic pieces such as left navigation panel, toolbar, right panel with format inspector and middle work area. I.e., the new UI style apple deploys with their keynote, pages and numbers.

I have searched but not found a comprehensive example that shows the major components and how these are linked/interacting. I don't see it in the Apple developer area either. I'd rather bootstrap my Mac OS X UI programming skills by learning from others than wading through new territory by myself.

Either Objective-C or Swift would be fine. I am targeting Yosemite.

Upvotes: 0

Views: 786

Answers (1)

uchuugaka
uchuugaka

Reputation: 12782

There's not an Xcode template for this. You just add an NSToolBar in IB SUper easy. Then the details of the rest can vary tremendously. But, it can easily be a 3 pane NSSplitview with view controllers managing each pane's views.

A navigation pane could easily be an NSTableView or outline view. Or it could be NSCollectionView.

An inspector could be a conglomerate of view controllers swapped in based on context or interaction.

Take a look at github and cocoacontrols.com to find some ideas.

The center pane would most likely be at a minimum an NSScrollView with a custom document view.

I have a post on SO detailing an NSClipView subclass that handles centering right when zoomed out or when the document is smaller.

Upvotes: 1

Related Questions