
Learning Swift
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Get valuable hands-on experience with Swift, the open source programming language developed by Apple. With this practical guide, skilled programmers with little or no knowledge of Apple development will learn how to code with the latest version of Swift by developing a working iOS app from start to finish.
You'll begin with Swift programming basics?including guidelines for making your code "Swifty"?and learn how to work with Xcode and its built-in Interface Builder. Then you'll dive step-by-step into building and customizing a basic app for taking, editing, and deleting selfies. You'll also tune and test the app for performance and manage the app's presence in the App Store.
Divided into four parts, this book includes:
- Swift 4 basics: Learn Swift's basic building blocks and the features of object-oriented development
- Building the Selfiegram app: Build model objects and the UI for your selfie app and add location support, user settings, and notifications
- Polishing Selfiegram: Create a theme and support for sharing and add custom views, image overlays, and localization
- Beyond app development: Debug and performance test with Xcode, automate chores with Fastlane, and user-test the app with TestFlight
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Preface
- Resources Used in This Book
- Audience and Approach
- Organization of This Book
- Conventions Used in This Book
- Using Code Examples
- O'Reilly Safari
- How to Contact Us
- Acknowledgments
- Part I. Welcome to Swift
- Chapter 1. Getting Started
- Xcode
- Getting Xcode
- Creating Your First Project
- Working with the Xcode Interface
- The Editor
- The Toolbar
- The Navigator
- Utilities
- The Debug Area
- Running Your Code
- The iOS Simulator
- Running on a Device
- Distributing Your Apps
- The Interface Builder
- Interfaces in iOS
- Conclusion
- Chapter 2. The Swift Programming Language
- The Swift Language
- Swift 3 Versus 4
- Playgrounds and Swift
- Comments
- Imports
- Variables
- Operators
- Collections
- Arrays
- Tuples
- Dictionaries
- Control Flow
- Loops
- Switches
- Types
- Working with Strings
- Sets
- Enumerations
- Type Safety and Conversion
- Optionals
- Type Casting
- Functions and Closures
- Using Functions as Variables
- Closures
- Convenience Features
- The defer Keyword
- The guard Keyword
- Making Your Code Swifty
- Conclusion
- Chapter 3. Object-Oriented Development in Swift
- Classes and Objects
- Initialization and Deinitialization
- Properties
- Inheritance
- Protocols
- Extensions
- Access Control
- Operator Overloading and Custom Operators
- Subscripts
- Generics
- Structures
- Error Handling
- Memory Management
- Design Patterns in Swift
- Model-View-Controller
- Delegation
- Swift Libraries
- Structuring an App
- Swift Package Manager
- Conclusion
- Part II. Building Selfiegram
- Chapter 4. Setting Up Our App
- Designing Selfiegram
- Creating the Project
- The Structure
- Renaming the Views
- Chapter 5. Building the Model Object
- The Selfie Object
- The SelfieStore
- Testing the SelfieStore
- Filling Out the Method Stubs
- Chapter 6. Building the Selfie List UI
- Creating the Selfie List
- Improving the Selfie List
- Chapter 7. Adding and Deleting Selfies
- Deleting Selfies
- Taking New Selfies
- Chapter 8. Viewing and Editing Selfies
- The Selfie Viewer
- Connecting the Code and the UI
- Editing a Selfie
- Chapter 9. Adding Location Info to the Selfies
- Updating the Model
- Testing Our New Model
- Showing a Selfie's Location
- Expanding the Map
- Determining Locations
- Configuring the App to Support Location
- Talking to the Location Hardware
- Chapter 10. Building a Settings View
- Building the Settings UI
- Connecting the Settings into Our Hierarchy
- Hooking Up the Settings
- Implementing the Settings
- Chapter 11. Reminders and Notifications
- Adding a Reminder to the Settings
- Creating a Notification
- Part III. Polishing Selfiegram
- Chapter 12. Theming and Sharing Selfiegram
- Custom Fonts
- Making the Theme
- Sharing Selfies
- Sharing from the Detail View Controller
- Sharing from the List View Controller
- Chapter 13. Custom Views and View Controllers
- A Camera View
- The Camera View Controller
- Building the UI
- Connecting the UI
- Talking to the Camera
- Calling the Capture View Controller
- Chapter 14. Image Overlays
- Creating the Overlay Model
- Testing the Overlay Manager
- Writing the Tests
- Returning Available Overlays
- Downloading Overlay Information
- Downloading Overlay Images
- Chapter 15. Overlay UI
- Building the UI
- Hooking Up the UI
- Creating the Overlay View
- Presenting the Overlays
- Initial Setup
- Drawing Eyebrows
- Vision and Image Detection
- Connecting It into the App
- Chapter 16. Localization and Internationalization
- Internationalization
- Generating the String Table
- Localization
- Translating the Strings
- Testing Locales
- Pseudolanguages
- Previewing Localizations
- Conclusion
- Part IV. Beyond Developing Selfiegram
- Chapter 17. Debugging
- The Debugger
- Breakpoints
- Inspecting Code
- Controlling Program Flow
- Performance
- Instruments
- Chapter 18. UI Tests
- UI Testing Classes
- Writing UI Tests
- A Basic Test
- Recording UI Actions
- Checking if Elements Exist
- Handling UI Interruptions
- Chapter 19. Automating Chores with Fastlane
- The Fastlane Tools
- Installing Fastlane
- Installing via Homebrew
- Installing via RubyGems
- Installing via Direct Download
- Setting Up a Project
- Doing a Build
- Configuring a Fastfile
- Chapter 20. Using Fastlane's Tools
- Code Signing with match
- The Problem That Match Solves
- match's Solution
- Generating Screenshots Using snapshot
- Using Boarding to Add Testers to TestFlight
- Managing Your App's Presence on the App Store Using deliver
- Getting the Metadata
- Submitting New Metadata
- Looking Further
- Index
- About the Authors
- Colophon
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.