Mac OS X Development Notes

Recently I've finally started learning how to develop applications for Mac OS X, or macOS as Apple likes to call it these days. I want to get a good idea of how Cocoa applications actually work, so I'm learning Objective-C before diving into Swift. I'm basing my learning heavily on the book Cocoa Programming for Mac OS X.

Common Design Features

As the years passed, many common design patterns in OS X applications started emerging, this should provide resources on how to use them.

NSTableView with +/- buttons

Example of NSTableView with +/- buttons

Many applications in OS X have an NSTableView with +/- buttons in a toolbar at its bottom. This provides a sleek design solution to a problem: How to I provide users a way to add new items to a list? With this approach you just let the user click the + button and a new entry is created and ready to be edited.

The way to create this element is by utilizing the NSSegmentedControl component. A great tutorial on how to do this is available on StackOverflow: NSTableView with +/- buttons like in System Preferences using only Interface Builder.

References

Here is a collection of great resources on old Mac OS X programming:

devnotes/macos.txt · Last modified: by nathanpc
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki