Book Image

Swift Cookbook

By : Cecil Costa, Cecil Costa
Book Image

Swift Cookbook

By: Cecil Costa, Cecil Costa

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The geekest keyboard


App extensions are a new feature where an application can come with some kind of plugins, which can even interact inside other apps.

In this case, we will develop a keyboard for the geeks. This keyboard will contain only two keys: key 0 and key 1. When you type a combination of eight keys, you will get a new character.

Getting ready

For this recipe, make sure that you have iOS 8; it doesn't matter whether you are using the simulator or a physical device. The custom keyboard feature is only available on iOS 8.

Create a new single view application called Chapter 11 Geekboard and let's start coding.

How to do it...

To create the geekest keyboard, follow these steps:

  1. The main development of this recipe is based on the app extension of the custom keyboard; however, as we will need a view for testing our keyboard, let's start by clicking on the storyboard and adding a text field on our view. Link this text field with the view controller, calling it "inputTextField":

        @IBOutlet...