Tag: segues
-
Adding Modal Views and Popovers in Swift 3.0
Modal views are one of the fundamental ways to present view controllers. Some early applications on the iPhone were completely modal views — some still do. Modals do not do their own housekeeping like navigation controllers or tab controllers, so they are not as efficient for the backbone of your application. They need the user’s…
-
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 be slightly difficult, but delegates to get the information back have…
-
The Swift Swift Tutorial: Why Do We Need Delegates?
[Updated to Swift 2.0/iOS9 SJL 9/28/15] A Note to readers: This post is out of date. Since Swift 3.0, iOS 10 and watchOS 3 have so many changes, I made a new post wth proper syntax, and a lot better illustrations. You can find that here on my site or here on LinkedIn Pulse …
-
The Swift Swift Tutorial: How to Use UITableView in Swift
[Converted to to Swift 2.0/iOS9 9/28/15 SJL] The workhorse control in iOS is the table view. With both a delegate and data source it is powerful, flexible and can get a bit complicated. In this lesson, we will add a table view controller between the Pizza Demo and the Edit Price scenes in our earlier…
-
The Swift Swift Tutorial: Using Delegates and Segues in Swift Part 2 — The Pizza Demo App
In our last post, we went through a very basic framework for segues and delegates in Swift. This time, we will add the segues and delegates to the pizza demo application so we can change the prices in the dictionary for the pizzas. Swift and Xcode is still in beta, and there are quirks I’ll…
-
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 you switch views never seems easy. Segues might be slightly difficult,…