Swift Swift: Using Color and UIColor in Swift Part 1: RGB

[Updated to Swift 2.0/iOS9.0 9/18/15 SJL - errors corrected 11/20/15] I'm color blind, and that makes me a very good person to teach you about color and UIColor.  I've painted for many years and my color blindness does not detract but actually helps me pick colors.  These two examples, one a water-color of mine from …

Swift Swift: Programmatic Navigation View Controllers in Swift

[Converted to Swift 2.0 -- SJL 9/17/15 ] Navigation controllers are the workhorse of  organizing view controllers. I've covered much of their use in other posts about MVC, segues and delegates. In this chapter, We’ll go through some of the Swift code for the Navigation controller. The View Controller Stack Navigation view controllers are stack …

The Joys of Beta Swift: More with Optionals and the “does not have a member named” error

We've had another change to the Swift compiler that was brought to my attention by an astute reader. I was aware of it, and you'll notice I even used it in the last few posts, but I really should have warned people about it, and got it fixed. Back in my post on Adding an …

Swift Swift: Using Tab Bar Controllers in Swift

[Updated to Swift 2.0/iOS9.0 9/20/2015 SJL] While Navigation controllers often have the limelight when it comes to Xcode's view  controllers, tab bar controllers are better for independent tasks in the same app, or for different ways of working with the same model. In this lesson we’ll take a look at tab bar controllers and after …

The Swift Swift Tutorials: Adding Modal Views and Popovers

[Updated to Swift 2.0/iOS9 9/29/15] There are times your user interface needs to grab attention for a control. This is what modal views and popovers are. Modal views are one of the oldest of the view controllers. Some early applications on the iPhone were completely modal views -- some still do.  Modals do not do …

The Swift Swift Tutorial: Using Tuples and Creating Multiple-Return Functions

While not classified as a collection type by Apple, tuples are the new collection-like type found in Swift. Tuples fit in a strange place between structs and arrays, but allow for some rather remarkable flexibility in code -- particularly when returning more than one value in a function. While an array is a collection type …