Book Image

Apple Watch App Development

By : Steven F. Daniel
Book Image

Apple Watch App Development

By: Steven F. Daniel

Overview of this book

With the increasing amount of new wearable devices hitting the market, wearables are the next wave of mobile technology. With the release of Apple's WatchKit SDK, a whole new world of exciting development possibilities hasopened up. Apple Watch App Development introduces you to the architecture and limitations of the Apple Watch platform, followed by an in-depth look at how to work with Xcode playgrounds. Here, we'll introduce you to the Swift programming language so you can quickly begin developing apps for the Apple Watch platform with the WatchKit framework and the Xcode Development IDE. We then discuss more advanced topics such as Notifiations, Glances, Closures, Tuples, Protocols, Apple pay, and using Swift playgrounds, with each concept backed up with example code that demonstrates how to properly execute it. We also show you how to package and deploy your Watch application to the Apple AppStore. By the end of this book, you will have a good understanding of how to develop apps for Apple Watch platform using the WatchKit framework and Swift 2.0.
Table of Contents (19 chapters)
Apple Watch App Development
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Preface
Index

Chapter 7. Adding Menus to Your App

Apple introduced a new, easy-to-use API to create context menus on the WatchKit platform. This simple API doesn't require you to include any delegate callbacks within your code, and these menu items can be easily created using Interface Builder; all you have to do is connect them to each of the Action methods, similar to what you would do with buttons or other Interface Builder objects.

The Apple Watch retina display includes a new touch-based technology known as Force Touch, which is nothing more than a long press gesture on iOS devices or 3D Touch on newer devices and is detected when the user applies slightly more pressure than performing a tap gesture. Whenever Apple Watch detects that a Force Touch gesture has been applied, the WatchKit app that is running displays the context menu, if one is configured.

In this chapter, we will begin by providing an overview of context menus before working through an application that builds upon our Shopping List...