Creating a Simple Mac Application Using Cocoa, Swift, and Storyboards

March 31st, 2017

Filed under: Cocoa, Mac Development | 3 comments

I’ve noticed there aren’t many articles or tutorials online about writing Mac apps in Swift. To help fill the void I’m writing this tutorial that guides you through the creation of a simple Cocoa app in Swift. The app converts temperatures from Celsius to Fahrenheit. Enter a temperature in Celsius, click a Convert button, and […]


Adding Markers to Text Lists when Pressing the Return Key

December 12th, 2016

Filed under: Cocoa, Mac Development | Be the first to comment!

I tried using Apple’s NSTextList class for creating ordered and unordered lists in an application I’m developing. I was able to create lists, but when I pressed the Return key inside an unordered list, no bullet was added. Because of this flaw in NSTextList I decided to implement my own class for lists. But I […]


NSTableView Disappearing Text

November 23rd, 2016

Filed under: Cocoa, Mac Development | Be the first to comment!

I was having a problem with disappearing text in a table view in a Mac application I’m developing. Selecting an item in the table view erased that item’s text from the table view. The table view is part of a split view. Dragging the split view’s divider erased the text from every item in the […]


Maintaining NSTextView Insertion Point After Core Data Save

November 21st, 2016

Filed under: Cocoa, Mac Development | 1 comment

I am working on a Mac journaling application that uses Core Data. The user interface consists of a table view and a text view. The table view contains a list of dates. Selecting a date fills the text view with what was written on that date. Use the text view to write. One problem I […]


Simple Ways to Customize NSSavePanel

September 8th, 2016

Filed under: Cocoa | Be the first to comment!

Cocoa provides the NSSavePanel class to open a save panel when the user wants to save a document. Save panels are initially configured for saving. The default button’s name is Save, and the panel’s title is also Save. Suppose your application exports documents to various file formats. Exporting is similar to saving so you would […]