         
         let tap = UITapGestureRecognizer(target: self, action: #selector(insertSelectedCharacter (_:)))
         let longPress = UILongPressGestureRecognizer(target: self, action: #selector(pressEnter))
+        let pinch = UIPinchGestureRecognizer(target: self, action: #selector(stopSpeaking))
         
         view.addGestureRecognizer(swipeDown)
         view.addGestureRecognizer(swipeUp)

        view.addGestureRecognizer(swipeRight)
        view.addGestureRecognizer(tap)
        view.addGestureRecognizer(longPress)
        isGyroAvailable()
    }
    

        (textDocumentProxy as UIKeyInput).insertText(" ")
    }
    
    // Say the content of the text field.
    // TODO: test this
    func speakContent() {
        var content = ""
        for view in self.view.subviews {
            if (view.isFirstResponder) {
                let textView = view as! UITextView
                content = textView.text
                break
            }
        }
        
        UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(content, comment: ""))
    }
    
    // Stop any and all currently playing audio.
    func stopSpeaking() {
        // Pause and resume VoiceOver. Not sure if this works as intended.
        UIAccessibilityPostNotification(UIAccessibilityPauseAssistiveTechnologyNotification, nil);
        UIAccessibilityPostNotification(UIAccessibilityResumeAssistiveTechnologyNotification, nil);
    }
    
    /*
