Changes

Jump to: navigation, search

An iOS 8 Swift Gesture Recognition Tutorial

36 bytes added, 14:32, 4 November 2016
no edit summary
<td width="20%">[[Identifying Gestures using iOS 8 Gesture Recognizers|Previous]]<td align="center">[[iOS 8 App Development Essentials|Table of Contents]]<td width="20%" align="right">[[Implementing TouchID Authentication in iOS 8 Apps|Next]]</td>
<tr>
<td width="20%">Identifying Gestures using iOS 8 Gesture Recognizers<td align="center"><td width="20%" align="right">Implementing TouchID Authentication in iOS 8 Apps</td>
</table>
<hr>
[[Image:xcode_6_gestures_in_outline.png|Gesture recognizers listed in the Xcode document outline panel]]
Figure 56-1
Having added and configured the gesture recognizers, the next step is to connect each recognizer to its corresponding action method.
Display the Assistant Editor and verify that it is displaying the content of ViewController.swift. Ctrl-click on the Tap Gesture Recognizer object either in the document outline panel or in the scene toolbar and drag the line to the area immediately beneath the viewDidLoad method in the Assistant Editor panel. Release the line and, within the resulting connection dialog, establish an Action method configured to call a method named tapDetected with the Type value set to UITapGestureRecognizer as illustrated in Figure 56-2:  [[Image:]] Figure 56-2.
<htmlet>ios10</htmlet>

Navigation menu