Blewitt, Alex Dr.,

Swift essentials : discover how to build iOS and watchOS applications in Swift 2 using Xcode / Dr Alex Blewitt. - Second edition. - 1 online resource. - Community experience distilled . - Community experience distilled. .

Includes index.

Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Exploring Swift; Open source Swift; Getting started with Swift; Numeric literals; Floating point literals; String literals; Variables and constants; Collection types; Optional types; Nil coalescing operator; Conditional logic; If statements; Switch statements; Iteration; Iterating over keys and values in a dictionary; Iteration with for loops; Break and continue; Functions; Named arguments; Optional arguments and default values; Guards Multiple return values and argumentsReturning structured values; Error handling; Throwing errors; Catching errors; Cleaning up after errors; Command-line Swift; Interpreted Swift scripts; Compiled Swift scripts; Summary; Chapter 2: Playing with Swift; Getting started with playgrounds; Creating a playground; Viewing the console output; Viewing the timeline; Displaying objects with Quick Look; Showing colored labels; Showing images; Advanced techniques; Capturing values explicitly; Running asynchronous code; Playgrounds and documentation; Learning with playgrounds Understanding the playground formatAdding a page; Documenting code; Playground navigation documentation; Text formatting; Symbol documentation; Limitations of playgrounds; Summary; Chapter 3: Creating an iOS Swift App; Understanding iOS applications; Creating a single-view iOS application; Removing the storyboard; Setting up the view controller; Swift classes, protocols, and enums; Classes in Swift; Subclasses and testing in Swift; Protocols in Swift; Enums in Swift; Raw values; Associated values; Creating a master-detail iOS application; The AppDelegate class; The MasterViewController class The DetailViewController classSummary; Chapter 4: Storyboard Applications with Swift and iOS; Storyboards, scenes, and segues; Creating a storyboard project; Scenes and view controllers; Adding views to the scene; Segues; Adding a navigation controller; Naming scenes and views; Swift and storyboards; Custom view controllers; Connecting views to outlets in Swift; Calling actions from interface builder; Triggering a segue with code; Passing data with segues; Using Auto Layout; Understanding constraints; Adding constraints; Adding a constraint with drag and drop Adding constraints to the Press Me sceneAdding missing constraints; Summary; Chapter 5: Creating Custom Views in Swift; An overview of UIView; Creating new views with Interface Builder; Creating a table view controller; Showing data in the table; Defining a view in a xib file; Wiring a custom view class; Dealing with intrinsic size; Creating new views by subclassing UIView; Auto Layout and custom views; Constraints and the visual format language; Adding the custom view to the table; Custom graphics with drawRect; Drawing graphics in drawRect; Responding to orientation changes

A fast-paced guide that provides an overview of Swift programming and then walks you through how to write iOS applications in detail. Progress through chapters on custom views, networking and parsing, and build a complete application as a Git repository, all by using Swift as the core language. This practical guide will give you hands-on experience with all the features of Swift programming. Following the practical examples in the book will help you successfully create your own iOS applications. No prior iOS programming experience is assumed; however, having some experience with any programming language will be beneficial.

9781785880964 1785880969

CL0500000714 Safari Books Online

GBB6G3481 bnb

018010581 Uk


iOS (Electronic resource)--Programming.
iOS (Electronic resource)


Swift (Computer program language)
Mobile apps--Development.
COMPUTERS / Programming Languages / General
Swift (Computer program language)


Electronic books.

QA76.73.S95

005.13/3