Tag: iPhone Programming

Change UIColors to RGB and HSB colors

One dilemma you’ll find when working with colors is switching between color systems. There’s two you’ll most often be using: the Red-Green-Blue or RGB and Hue-Saturation-Brightness or HSB. Download the Exercise file and run. It will give you the HSB value, but what if…

Programmaticall​y Add Split View Controllers

An often ignored but rather powerful View Controller is the UISplitViewController. You can make one from a template and the storyboard, but I often skip both and do it programmatically, which is especially good when I’m prototyping in a playground.  Let’s give it a…

Thrown Errors

There’s many ways to handle errors in Swift. For some errors, using throws is a great way to handle errors without crashing the system. Download the exercise file. You’ll find a project with an embedded playground.  While there’s a lot better ways to do…

Tip: Add Drop Shadows

A video of this tip can be found on LinkedIn Learning User Interfaces often use shadows to make them look less flat, but it isn’t obvious how to add one to a view on your app. In this tip, I’ll show you how to…

Make Round Buttons and UIViews

In the good old days, Apple used a lot of rounded corner buttons. Many developers use several images to get the effect of round buttons. The CALayer of UIButton does have a feature for you to easily get rounded corners, and even circular buttons….

Date and Time in iOS

The song says time is on my side, but I sometimes I wonder about that when trying to work with the time types in iOS. Let me show you some of the time types. In Xcode, Open up a blank playground. There are two…

This Old App: Update to Xcode 9

A few months ago, Apple threw out my app Interval Runcalc for being too old. While it wasn’t the most innovative, complex or profitable, it was an app I used frequently myself. It was a calculator for time, pace and distance for running not…

Tab Bar Controllers in Xcode 8 Storyboards

In this lesson, we’ll take a look at tab bar controllers and how to add them in the storyboard.  For more on implementing them completely in code see Swift Swift: Using Tab Bar Controllers in Swift. For more on data sharing once set up…

Swift Swift: Using NSTimer to Make a Timer or Alarm

With the launch of the Apple Watch it’s time for timers in iOS and WatchKit. Learning to use timers is a very important skill for most developers. There are many places we need to schedule regular intervals of time to do things. In my…

Tab Bar Controllers in Storyboards

[Updated to Swift 2.0/iOS9 9/21/15 SJL] While Navigation controllers often have the limelight when it comes to Xcode controllers, Tab Bar controllers are great for independent tasks in the same app or for different ways of working with the same model. In this lesson,…