Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Swift Essentials (Second Edition)
  • Table Of Contents Toc
Swift Essentials (Second Edition)

Swift Essentials (Second Edition) - Second Edition

By : Alex Blewitt
5 (3)
close
close
Swift Essentials (Second Edition)

Swift Essentials (Second Edition)

5 (3)
By: Alex Blewitt

Overview of this book

Swift was considered one of the biggest innovations last year, and certainly with Swift 2 announced at WWDC in 2015, this segment of the developer space will continue to be hot and dominating. This is a fast-paced guide to provide an overview of Swift programming and then walks you through in detail how to write iOS applications. Progress through chapters on custom views, networking, parsing and build a complete application as a Git repository, all by using Swift as the core language
Table of Contents (11 chapters)
close
close
10
Index

Responding to user interaction


Typically, a watch user interface will present information to the user or let them select or manipulate it in some way. When items are presented in a table, then it is natural to let the user tap on the row to show a subsequent screen. Watch applications use segues to move from one screen to another in a similar way to iOS applications.

The first step will involve creating a new controller file called RepositoryListController.swift. This will be used to hold the RepositoryListController and RepositoryRowController classes, in a very similar way to the existing InterfaceController. As with the other view, there will be a table to store the rows, and each row will have a name label:

class RepositoryRowController: NSObject {
  @IBOutlet weak var name: WKInterfaceLabel!
}
class RepositoryListController: WKInterfaceController {
  let delegate = WKExtension.sharedExtension().delegate as! ExtensionDelegate
  @IBOutlet weak var repositoriesTable: WKInterfaceTable!
}

Tip...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Swift Essentials (Second Edition)
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon