Category: Swift Programming

Swift Watchkit: How to Add Simple Dynamic Tables to Apple Watch

In the last post, we looked at scroll views and static tables. There are many instances where tables filled with data at runtime are necessary. If you are familiar with UITableViewController, you may be delighted to know that WKInterfaceTable is a lot simpler to…

A Swift Guide to Working with Classes Part Two: Advanced Class Techniques

In our first part we looked at some of the basics of classes in Swift. In this part, we look at some of the more advanced features of classes which developers use every day — often without knowing it. We’ll explore first a bit…

Swift Watchkit: Making ScrollViews and Static TableViews.

To state the obvious, The Apple Watch has very small  screen real estate. There are times we need more screen space than is available. In iOS, there are scroll views. One subclass of scroll views are the table views. Table views come in two…

A Swift Tutorial to Working with Classes Part 1:Basic Classes

I find a lot of confusion among beginners and a handful of intermediate developers about what is a class. Object oriented languages like Swift, Objective C or C++ use classes to organize everything in the language and the API’s. You might have heard words…

Swift Watchkit: Working with Modal Views Part 1: Segue with a Delegate

Modal views on iPhones and ipads are used for input of information that requires attention. One of the on the Apple Watch is a modal view. You cannot mix a page-based interface with a hierarchical (i.e. navigation) interface as we learned in previous lessons….

Swift WatchKit: Introducing Navigation to the Apple Watch(Part 4: Dismissals and Segues)

In our lessons setting up navigation controllers on the Apple Watch, we’ve learned how to set up the storyboard,  how to use push controllers programmatically and introduced sending data to another controller and back using contexts and delegates.  In this lesson, we’ll pass data…

Swift WatchKit: Introducing Navigation to the Apple Watch(Part 3: Using Delegates and Contexts)

In our last lesson we set up navigation in the Storyboard and programmatically. We left off with passing data from one view controller to another using the context parameter like this: We made a context variable which we passed to the destination controller. We…