Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
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
Developing a Simple Swift Application
Designing the Interface
Connecting the Code
Using the iOS Simulator
Conclusion
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
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
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 It’s 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
← Prev
Back
Next →
← Prev
Back
Next →