Category: iOS10

Custom Table View Cells in Swift 3

In iOS you are limited to two labels and an image for one of the standard table view cell styles. You might want more custom cells than this. You are not alone with  other developers including, Instagram, Twitter, Feedly and even Apple often using more than… Continue Reading “Custom Table View Cells in Swift 3”

Introducing Table Views in Swift 3

Table views on any mobile platform are the workhorse of any application. To be a good developer you need  to make table views easily. Tables in iOS  use the UITableView class to do so. This is a very powerful class with many features to… Continue Reading “Introducing Table Views in Swift 3”

What Do you do with Any?

There’s been a major change to Swift 3.0 That many people might find a little disturbing in code, and others may have no idea what it is. In one sense that’s the idea. Apple changed AnyObject to Any in Swift 3.0. This three-letter word is… Continue Reading “What Do you do with Any?”

Why do we need Delegates in iOS and WatchOS?

About two years ago someone asked me a very good question: Why do we need delegates for UIViewControllers?  He thought Swift  made things easier, but this delegate stuff seems very complicated. Shouldn’t we be able to send a message or initializer between classes? When… Continue Reading “Why do we need Delegates in iOS and WatchOS?”

Understand and Use Closures in Swift

Have you ever seen some factory method in UIKit and see this strange parameter called completion or completionHandler? Usually you put nil there and leave it alone. These strange things like (Double,Double) -> Bool things are closures. Closures are functions you use as types,… Continue Reading “Understand and Use Closures in Swift”

Make a WatchOS 3 Haptic Catalog with a Picker

How does the Apple Watch communicate to the user when they are not looking at the watch face? That is done with haptics. Haptics are sounds and taps letting the user know something is happening. In this lesson, I’ll explain to you how to use haptics… Continue Reading “Make a WatchOS 3 Haptic Catalog with a Picker”

How to Make a Tab Bar Controller in Swift 3.0 Code

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… Continue Reading “How to Make a Tab Bar Controller in Swift 3.0 Code”

Adding Modal Views and Popovers in Swift 3.0

Modal views are one of the fundamental ways to present view controllers. Some early applications on the iPhone were completely modal views — some still do.  Modals do not do their own housekeeping like navigation controllers or tab controllers, so they are not as… Continue Reading “Adding Modal Views and Popovers in Swift 3.0”

Create Dynamic and Static Table Views in Swift 3

In an early post on this site, I wrote a table view tutorial. I decided to update that tutorial a bit for The Swift Swift View Controllers Book and add a bit more sophistication and depth. This tutorial deep dives in the subject. Both will… Continue Reading “Create Dynamic and Static Table Views in Swift 3”