Tag: Programming Apple watch

Tables and Scroll Views in WatchOS2

One of the most powerful and important controls on both wearable and mobile devices are table views. Table views come in two flavors: static and dynamic. Dynamic table views read data from a collection type and displays it. Static tables allow for a vertical… Continue Reading “Tables and Scroll Views in WatchOS2”

Swift WatchKit: Selecting, Deleting and Adding Rows in an Apple Watch Table

In our first part of this series, we made a simple dynamic table for the Apple Watch. Based on some pace data when I ran the Hot Chocolate 15K, we displayed the pace I ran at the mile splits. In a real running app,… Continue Reading “Swift WatchKit: Selecting, Deleting and Adding Rows in an Apple Watch Table”

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… Continue Reading “Swift Watchkit: How to Add Simple Dynamic Tables to Apple Watch”

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… Continue Reading “Swift Watchkit: Making ScrollViews and Static TableViews.”

Swift Watchkit: Working With Modal Views Part 3: Modal Page Views

Apple’s  documentation for WatchKit  is quite clear, even when it is lying. The documentation states you can have  hierarchical navigation or page navigation but not both. Here’s is where it lies:  you can have a page-based navigation as part of a hierarchical navigation scheme.… Continue Reading “Swift Watchkit: Working With Modal Views Part 3: Modal Page Views”

Swift WatchKit: Working with Modal Views Part 2: Presenting Programmatically

In the first part in this series we implemented a modal interface in WatchKit with a segue. In this part we’ll present the modal programmatically and once again set up a delegate and context for moving data between controllers. Open the project from the… Continue Reading “Swift WatchKit: Working with Modal Views Part 2: Presenting Programmatically”

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.… Continue Reading “Swift Watchkit: Working with Modal Views Part 1: Segue with a Delegate”

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… Continue Reading “Swift WatchKit: Introducing Navigation to the Apple Watch(Part 4: Dismissals and Segues)”

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… Continue Reading “Swift WatchKit: Introducing Navigation to the Apple Watch(Part 3: Using Delegates and Contexts)”

Swift WatchKit: Introducing Navigation to the Apple Watch(Part 2: Hierarchical Interfaces)

Apple WatchKit  gives you a choice when  it comes to navigation. You can be Page-based as we introduced in our last lesson. Another alternative, is hierarchical interfaces, which closely resemble navigation controllers on the phone.  In this lesson, we’ll introduce the hierarchical type of… Continue Reading “Swift WatchKit: Introducing Navigation to the Apple Watch(Part 2: Hierarchical Interfaces)”