Category: ios8

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”

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… Continue Reading “Tab Bar Controllers in Xcode 8 Storyboards”

How to Use UIImagePickerController for a Camera and Photo Library in Swift 3.0.

Almost every iPhone and iPad now has a camera. Many people want to use a camera in their apps for various reasons. While you may not be building the next Instagram or Twitter, there are many places where photo documentation comes in handy. There… Continue Reading “How to Use UIImagePickerController for a Camera and Photo Library in Swift 3.0.”

How to Use MapKit for 2D and 3D Map Views.

Everyone may remember when Apple first introduced MapKit to replace Google Maps on iPhones, they ended up to apologizing. However over time, developers have found how easy it is to use MapKit. This API provides features which make using  both 2D and 3D maps… Continue Reading “How to Use MapKit for 2D and 3D Map Views.”

The Step by Step Guide to Custom Presentation Controllers

Ever wanted that sliding sidebar or an alert with a image picker? Apple has many great ways of presenting view controllers,  but sometimes we want something different, something new. For that we subclass UIPresentationController. However there’s a few concepts that you’ll need to wrap… Continue Reading “The Step by Step Guide to Custom Presentation Controllers”

Using Settings Bundles with Swift

Have you ever wondered how to put  user defined settings for your app into the settings app?  Xcode can create a special property list called a settings bundle which can append the  NSUserDefaults with more entries from Settings App.  You’ll find out in this… Continue Reading “Using Settings Bundles with Swift”

Using WatchOS2 Navigation in Swift

It’s rare to have a one controller application, even in something as small as the Apple watch. Multiple View Controllers, or Interface Controllers as they are called in WatchKit, need ways to move between controllers. WatchOS2 has a simplified version of the iOS navigation… Continue Reading “Using WatchOS2 Navigation in Swift”

How to Use Property Lists (.plist) in Swift

This will be the first in a series of lessons on persistence in iOS applications. Persistence is keep data around even if your app ends. As we’ll see in this series there are many techniques to save and read data. One Common one Apple… Continue Reading “How to Use Property Lists (.plist) in Swift”

How and Why To Use Unsigned Integers (UInt)

In the beginning there was the unsigned integer, and it was good. If you go deep into machine code you will still find that any device is nothing more than unsigned integers. All other values Int, Float, Bool, Character, and String are forms or… Continue Reading “How and Why To Use Unsigned Integers (UInt)”

How to Make Drill-Down Tables in Swift

Table views are a lot like potato chips: You can’t have just one. Often, table views relate to each other in what is often referred to as a drill-down. Drill downs typically take the selected data and provide another list in a table about… Continue Reading “How to Make Drill-Down Tables in Swift”