Swift Essentials - Second Edition [eBook]

时间:2020-12-15 07:01:49
【文件属性】:

文件名称:Swift Essentials - Second Edition [eBook]

文件大小:4.34MB

文件格式:PDF

更新时间:2020-12-15 07:01:49

Swift

Swift Essentials provides an overview of the Swift language and the tooling necessary to write iOS applications. From simple Swift commands on the command line using the open source version of Swift, to interactively testing graphical content on OS X with the Xcode Playground editor, Swift language and syntax is introduced by examples. This book also introduces end-to-end iOS application development on OS X with Xcode by showing how a simple iOS application can be created, followed by how to use storyboards and custom views to build a more complex networked application. The book concludes by providing a worked example from scratch that builds up a GitHub repository browser for iOS, along with an Apple Watch application. What this book covers Chapter 1, Exploring Swift, presents the open source version of Swift with the Swift Read-Evaluate-Print-Loop (REPL) and introduces the Swift language through examples of standard data types, functions, and looping. Chapter 2, Playing with Swift, demonstrates Swift Xcode Playgrounds as a means to interactively play with Swift code and see graphical results. It also introduces the playground format and shows how playgrounds can be documented. Chapter 3, Creating an iOS Swift App, shows how to create and test an iOS application built in Swift using Xcode, along with an overview of Swift classes, protocols, and enums. Chapter 4, Storyboard Applications with Swift and iOS, introduces the concept of Storyboards as a means of creating a multiscreen iOS application and shows how views in the Interface Builder can be wired to Swift outlets and actions. Chapter 5, Creating Custom Views in Swift, covers custom views in Swift using custom table views, laying out nested views, and drawing custom graphics and layered animations. Chapter 6, Parsing Networked Data, demonstrates how Swift can talk to networked services using both HTTP and custom stream-based protocols. Chapter 7, Building a Repository Browser, uses the techniques described in this book to build a repository browser that can display information about users' GitHub repositories. Chapter 8, Adding Watch Support, introduces the capabilities of the Apple Watch and shows how to build an extension for the iOS app to provide data directly on the watch. The Appendix, References to Swift-related Websites, Blogs, and Notable Twitter Users, provides additional references and resources to continue learning about Swift.


网友评论