Contents

Preface

Acknowledgments

About the Author

1 Getting Started with WatchKit Programming

Specifications of the Apple Watch

Getting the Tools for Development

Understanding the WatchKit App Architecture

Deploying Apple Watch Apps

Interaction between the Apple Watch and iPhone

Types of Apple Watch Applications

Hello, World!

Creating an iPhone Project

Examining the Storyboard

WatchKit App Lifecycle

Modifying the Interface Controller

Running the Application on the Simulator

Summary

2 Apple Watch Interface Navigation

Interface Controllers and Storyboard

Lifecycle of an Interface Controller

Navigating between Interface Controllers

Hierarchical Navigation

Page-Based Navigation

Passing Data between Interface Controllers

Customizing the Title of the Chevron or Cancel Button

Navigating Using Code

Presenting a Series of Pages

Changing the Current Page to Display

Returning Data from an Interface Controller

Summary

3 Responding to User Actions

Using the Tap Gesture to Interact with Controls

Button

Switch

Slider

Alerts and Action Sheets

Summary

4 Displaying and Gathering Information

Displaying Information

Label

Image

Table

Picker

Playing Media Files

Gathering Information

Getting Text Inputs

Getting Emojis

Laying Out the Controls

Force Touch

Displaying a Context Menu

Adding Menu Items Programmatically

Summary

5 Accessing the Apple Watch Hardware

Making Phone Calls and Sending Messages

Recording Audio

Digital Crown

Accelerometer

Taptic Engine

Summary

6 Programming Complications

Introducing the ClockKit Framework

Placement for Complications

Using the Template Classes

Building a Movie Showtime Complication Example

Creating the Project

Selecting Complication Families Support

Creating the Complication Placeholder Template

Setting Privacy Behavior

Populating the Complications with Real Data

Time Travel

Setting the Refresh Frequency

Summary

7 Interfacing with iOS Apps

Introducing the Watch Connectivity Framework

Types of Communication

Using the Watch Connectivity Framework

Comparing the Different Modes

Connecting to the Outside World

Getting Location Data

Display Map

Accessing Web Services

Saving Data

Creating the Project

Writing to Files

Using NSUserDefaults

Summary

8 Displaying Notifications

What Is a Notification?

Types of Notifications on the Apple Watch

Implementing the Short-Look Interface

Implementing the Long-Look Interface

Summary

9 Displaying Glances

What Is a Glance?

Implementing Glances

Customizing the Glance

Testing the Glance

Making the Glance Useful

Implementing Background Fetch

Updating the Glance

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.214.155