As a mac user, I have finally come to realize that there is a standard for mac applications, and more specifically their GUI. Even though Apple has a library for easily making applications for the Aqua design, most expected eye candy is not included in their standard library. This includes gradient switches, menu bars, glossy buttons, glow on everything possible, etc. I decided to make an application with as nice a GUI as possible, and see how it felt to program.
After using a few apps from the Mac App Store, I had a pretty good idea of what a good app should look like. It took me a long while to realize this, but just because it is not in Apple’s Cocoa library does not mean you should not use it. In fact, there are a few UI components in Apple’s library that they do not use themselves, which is a great shock to me. Ultimately, if you want your app to have a good GUI, it seems to me that you have to slave over every detail, making every inch of the interface perfect.
I started out by making a side menu, such as that in Finder, iTunes, Mail, and pretty much every other app that comes with the mac. I first really noticed this when I downloaded Alfred from the Mac App Store, which had a menu bar just like this in its preferences. Seeing this, I wondered if Apple had some sort of API for this kind of thing, but my searches came up negative. I then went on to recode this menu bar in Objective-C, Cocoa, and of course, I used CoreGraphics.
A semi-standard side menu
The thing to note about making something like this is the attention to detail that you must make. The general idea is quite simple, you just need a gradient over an icon, and of course some text. The difficult thing that you don’t consider is focus. When the window is deselected, you have to make everything change. You will notice that when you deselect a finder window, the text, blue color, and everything else on the left changes to gray, and gets slightly darker.
Another thing that I implemented, which is not quite worthy of a screenshot, is a gradient slider. I saw one of these in the safari extensions preferences pane, and thought it would be a cool thing to implement. I originally considered using a checkbox, but I then decided that something as small as a simple check box would not represent the significance of the flag that was being set. Thus, if you want to enable hidden file showing through my app, you can use a large, extravagant gradient slider.
There are a few other nice things that I created, before I finalized an app that utilized all of these UI features. Since I did not want to have to write any additional functionality, I made a mash of a ton of different mac utilities I have made in the past, putting them into one application. I am not saying that this app has a perfect user interface, but it certainly does use custom drawing more than most basic mac applications. The app I created is called FileTools, and can be downloaded from the macheads101 website. The source code is also available on my GitHub page, under the Mac-Utils repository.
Another thing to note about this application is that I implemented an update framework called Sparkle. This framework has become pretty standard in mac applications, and is really easy to use. This means that I never have to update the executable that is sitting on macheads101.com, because it will ask you to update once you open it.