Learning Swift. Building Apps for OS X and iOS - Helion
ISBN: 978-14-919-4069-3
stron: 536, Format: ebook
Data wydania: 2016-05-02
Księgarnia: Helion
Cena książki: 149,00 zł
Get hands-on experience with Apple’s Swift programming language by building real working apps. With this practical guide, skilled programmers with little or no knowledge of Apple development will learn how to code with Swift 2 by developing three complete, tightly linked versions of the Notes application for the OS X, iOS, and watchOS platforms.
In the process, you’ll learn Swift’s fundamentals, including its syntax and features, along with the basics of the Cocoa, CocoaTouch, and WatchKit frameworks. This book teaches you how to use common design patterns for Swift, how to structure an application for Apple’s platforms, and how to submit working apps to the App Store.
Divided into four distinct parts, this book includes:
- Swift 2 basics: Learn Swift’s features for object-oriented development, as well as various developer tools
- OS X app development: Set up your app, work with its documents, and build out its features
- iOS app development: Use multimedia, contacts, location, notifications, and iCloud files to build a fully featured iOS Notes app
- Advanced app extensions: Support Apple Watch and learn how to debug, monitor, and test all three of your Swift apps
Osoby które kupowały "Learning Swift. Building Apps for OS X and iOS", wybierały także:
- Zen Steve'a Jobsa 29,67 zł, (8,90 zł -70%)
- Swift 4. Koduj jak mistrz. Wydanie IV 66,98 zł, (36,84 zł -45%)
- Podstawy języka Swift. Programowanie aplikacji dla platformy iOS 49,00 zł, (26,95 zł -45%)
- iOS Developer. Kurs video. Opanuj Swift, framework UIKit i 126,70 zł, (70,95 zł -44%)
- Programowanie w języku Swift. Big Nerd Ranch Guide 77,59 zł, (43,45 zł -44%)
Spis treści
Learning Swift. Building Apps for OS X and iOS eBook -- spis treści
- Preface
- Resources Used in This Book
- Audience and Approach
- Organization of This Book
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- I. Swift Basics
- 1. Getting Started
- The Apple Developer Program
- Registering for the Apple Developer Program
- Downloading Xcode
- Creating Your First Project with Xcode
- The Xcode Interface
- The editor
- The toolbar
- The navigator
- Utilities
- The debug area
- The Xcode Interface
- Developing a Simple Swift Application
- Designing the Interface
- Connecting the Code
- Using the iOS Simulator
- Conclusion
- The Apple Developer Program
- 2. The Basics of Swift
- The Swift Programming Language
- Swift 1 Versus Swift 2
- Playgrounds
- Comments
- Control Flow
- Loops
- Switches
- Variables and Constants
- Operators
- Types
- Working with Strings
- Comparing Strings
- Searching Strings
- Optional Types
- Type Casting
- Tuples
- Arrays
- Dictionaries
- Enumerations
- Associated values
- Sets
- Functions and Closures
- Using Functions as Variables
- Closures
- The defer Keyword
- The guard Keyword
- Conclusion
- The Swift Programming Language
- 3. Swift for Object-Oriented App Development
- Classes and Objects
- Initialization and Deinitialization
- Properties
- Inheritance
- Computed properties
- Observers
- Lazy properties
- Protocols
- Extensions
- Access Control
- Operator Overloading
- Generics
- Subscripts
- Structures
- Modules
- The Swift Standard Library, Foundation, Cocoa, and Cocoa Touch
- Data
- Loading Data from Files and URLs
- Serialization and Deserialization
- Error Handling
- Memory Management
- Design Patterns in Cocoa and Cocoa Touch
- Model-View-Controller
- Delegation
- Structuring an App
- The Application Delegate
- Window Controllers and View Controllers
- Nibs and Storyboards
- Conclusion
- Classes and Objects
- II. An OS X App
- 4. Setting Up the OS X Notes App
- Designing the OS X Notes App
- Creating the OS X Project
- Defining a Document Type
- Adding the Icon
- Conclusion
- 5. Working with Documents on OS X
- The NSDocument Class
- Storing Data in the Document
- Storing Text
- Package File Formats
- The guard Keyword, and Why Its Great
- Saving Files
- Loading Files
- A Basic UI
- Conclusion
- 6. User Interfaces and iCloud
- Updating the UI
- Document-Filetype-Extension UI
- Getting an Icon for the Collection View Cells
- Adding Attachments
- Storing and Managing Attachments
- Displaying Data in the Collection View
- Enhancing Attachments
- Opening Attachments
- JSON Attachments
- Adding Attachments via Drag-and-Drop
- Adding QuickLook
- iCloud
- The Basics of iCloud
- Conclusion
- III. An iOS App
- 7. Setting Up the iOS Notes App
- Designing the iOS Notes App
- Creating the iOS Project
- Enabling the iOS App for iCloud
- Defining a Document Type
- Conclusion
- 8. Working with Files in iCloud
- The App Sandbox
- iCloud Availability
- Creating the Document List View Controller
- View Controllers and Storyboards
- The Navigation Controller
- Collection Views
- Using Constraints to Control Size and Position
- Creating the Document Class
- Listing Documents
- Creating Documents
- Downloading from iCloud
- Deleting Documents
- Renaming Documents
- Conclusion
- 9. Working with Documents on iOS
- Adding a View to Display Notes
- Editing and Saving Documents
- Conclusion
- 10. Working with Files and File Types
- Setting Up the Interface for Attachments
- Listing Attachments
- Determining Types of Attachments
- Displaying Attachment Cells
- Dealing with Conflicts
- Creating the Quick Look Thumbnail
- Conclusion
- 11. Images and Deletion
- Adding Attachments
- Adding Image Attachments
- Viewing Attachments
- Deleting Attachments
- Conclusion
- 12. Supporting the iOS Ecosystem
- Sharing with UIActivityController
- Handoffs
- Searchability
- Conclusion
- 13. Extending iOS Apps
- Searching with a Spotlight Indexing Extension
- Today Widgets
- Conclusion
- 14. Multimedia, Contacts, Location, and Notifications
- Location Attachments
- Audio Attachments
- Video Attachments
- Contact Attachments
- Notifications
- Conclusion
- 15. Polishing the iOS App
- Speaking Text
- Opening Links in SFSafariViewController
- 3D Touch
- Home Screen Quick Actions
- Peek and Pop
- Settings
- Undo Support
- Images with Filters
- Worldwide Apps
- Internationalization
- Localization
- Accessibility
- Splitscreen Multitasking
- Conclusion
- IV. Extending Your Apps
- 16. Building a watchOS App
- Designing for the Watch
- Designing Our watchOS App
- Creating the watchOS Extension
- Communicating with the iPhone
- User Interfaces for the Apple Watch
- Showing Note Contents
- Creating New Notes
- Adding Handoff Between the Watch and the iPhone
- Glances
- Conclusion
- 17. Code Quality and Distribution
- Debugging
- Instruments
- Testing
- Unit Testing
- UI Testing
- Using Objective-C and Swift in the Same Project
- Using Swift Objects in Objective-C
- Using Objective-C Objects in Swift
- The App Store
- App Thinning
- Testing iOS Apps with TestFlight
- Conclusion
- Index