

Let’s get started by opening the Main.storyboard file. Also, you will find a few colors already existing in the Assets catalog, but we’ll talk later about these. You will find out that most of the UI has been made already, but not all we will make together part of it, and no logic is implemented as well. Once you download it, open the Xcode project and navigate yourself around. There is a starter package for you to download, where besides the Xcode project you will also find a folder with a few images that we will need to add later to the project.

So, our demo app today that will be our vessel on new macOS programming explorations is a Body Mass Index (BMI) calculator: A few important steps and considerations hide behind the making of preferences, and you will get to know them.įinally, we will have the chance to meet new Cocoa controls and we will learn how to override default appearance, such as changing the background color of a view it might sound simple, but it’s not as straightforward as it is in iOS.Īll the above will be presented by going through the steps of making a new simple application. Of course, our preferences window here is going to be extremely simple, but you will get some really valuable lessons on how to deal with preferences in general. See for example the Xcode > Preferences or Safari > Preferences window and you will understand what I am talking about. That window that many apps provide for making settings and configurations. The first goal here is to see how to provide different sets of assets so an app can work well in both modes.īesides that, I am going to show you how to create a preferences window. But despite its nice appearance, it inevitably puts developers into additional efforts in order to provide images, colors and other assets for both dark and light modes.

Dark theme gives a great look-and-feel to macOS which all developers and single users have undoubtedly loved. However, there is one thing that was not discussed at all (intentionally), and that is the dark theme that was first presented on macOS Mojave (10.14), and what actions a developer has to do so an app works properly in both dark and light content. So, if you have gone through the previous post, then you already know that the main focus was on window controllers and windows, panels, loading and presenting additional windows, and more. In this tutorial, we are going to explore and unveil new interesting things that would be necessary to anyone who wants to make their way to macOS development.

Welcome to another macOS programming tutorial! In the previous post we made our introductory steps on macOS programming world as we discussed about fundamental concepts.
