Tag: Xcode

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”

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… Continue Reading “Swift Swift: Using NSTimer to Make a Timer or Alarm”

Swift Swift: Using The Navigation Bar Title and Back button.

[Updated for Xcode 7.2/Swift 2.1 2/5/16] Note: Click here for the  Swift 3.0/Xcode 8 version of this tutorial  In writing the Swift Swift View Controllers book, it came to my attention many people don’t understand the functionality of the navigation toolbar’s title and Back… Continue Reading “Swift Swift: Using The Navigation Bar Title and Back button.”

The Joys of Beta Swift: as Versus as! and Why I Avoid Betas

It came to my attention this week there’s a big change to Swift code on the way. It doesn’t look big though: it is the difference between as and as!. The keyword as is the conversion operator. Usually type or class are easily defined… Continue Reading “The Joys of Beta Swift: as Versus as! and Why I Avoid Betas”

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

Swift Swift Tutorials: Calculator Style buttons in an Auto Layout Xib

Some people want calculator-type buttons. It would be nice to have such buttons for say, an order entry app. In this lesson we’ll put together a set of buttons to make a layout for an order entry system. Along the way I’ll show how… Continue Reading “Swift Swift Tutorials: Calculator Style buttons in an Auto Layout Xib”

Basic Auto Layout: A Practical View for Beginners

Note: When I originally posted the Basic Auto Layout video on YouTube, I recorded it live and did not make a script I could post underneath it. This post makes the same UI as the video, but with a few differences in depth of… Continue Reading “Basic Auto Layout: A Practical View for Beginners”

From Apple to Raspberry Pi: Making Round Rectangle Buttons — The Movie

When I posted yesterday about GIMP and making Buttons for Python projects on the Raspberry Pi, I had thought someone would have a tutorial for the classic pre-iOS7 rounded rectangle button. I didn’t find any. Here is a video I put together of making… Continue Reading “From Apple to Raspberry Pi: Making Round Rectangle Buttons — The Movie”

From Apple to Raspberry Pi: Living without Storyboards and Interface Builder

In iOS, avoiding Interface Builder is nearly impossible. IB is old – as old as the Xcode SDK itself. Interface builder was one of the components of NextStep, and thus one of the reasons Steve Jobs got his old job back, who then developed… Continue Reading “From Apple to Raspberry Pi: Living without Storyboards and Interface Builder”

From Apple to Raspberry Pi: Using Inheritance and Overrides

Object oriented languages have a  concept called inhertance. A class can give its methods and properties to another class, which then replaces or expands the inherited class. We call the new class a subclass. When we replace a function or method we override the… Continue Reading “From Apple to Raspberry Pi: Using Inheritance and Overrides”