Tag: delegate

Protocols and Time Pickers

While there is the date components picker, sometimes you want a picker the gives a time interval in seconds. In this two-part tutorial, Let me show you how to set up one, and discuss some good uses of protocols beyondself If you download the… Continue Reading “Protocols and Time Pickers”

Using Segues and Delegates for Navigation Controllers in Swift 4.0

[Updated 2/13/2018 to Xcode 9 / Swift 4.0] It should be one of the easiest things we do, and yet for many it is the most confusing. Getting data from one view controller to another as you switch views never seems easy. Segues might… Continue Reading “Using Segues and Delegates for Navigation Controllers in Swift 4.0”

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: 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 Swift: Split View Controllers (Round Two) Part 1: The Master-Detail template

Back in July of 2014, I wrote one of this first posts on Split views, I said I would write another post on the subject. I ended up making this a section in chapter six of my Book I ended up making this section… Continue Reading “Swift Swift: Split View Controllers (Round Two) Part 1: The Master-Detail template”

Swift Swift: Using Xibs and Delegates with Modal Views

In the last post, I showed how to create modal views and popovers on an iPad . That lesson was missing two critical things for modal views, which we will cover in this one. We will learn how to add a .xib file to… Continue Reading “Swift Swift: Using Xibs and Delegates with Modal Views”

The Swift Swift Tutorial: Using Segues and Delegates in Navigation Controllers (Part 1 — The Template)

[Updating to Swift 2.0  SJL 9/17/15] Click here for the Swift 3.0 version of this post It should be one of the easiest things we do, and yet for many it is the most confusing. Getting data from one view controller to another as… Continue Reading “The Swift Swift Tutorial: Using Segues and Delegates in Navigation Controllers (Part 1 — The Template)”