Changes

Detecting iOS 7 Touch Screen Gesture Motions

42 bytes added, 20:01, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
The application will display the X and Y coordinates of the touch and update these values in real-time as the finger moves across the screen. When the finger is lifted from the screen, the start and end coordinates of the gesture will then be displayed on two label objects in the user interface. Select the Main.storyboard file and, using Interface Builder, create a user interface such that it resembles the layout in Figure 45-1:
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
[[Image:ios_7_touch_motion_ui.png|The user interface layout for an iOS 7 touch motion example app]]
Be sure to stretch the labels so that they both extend to cover most of the width of the view.
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
Select the top label object in the view canvas, display the Assistant Editor panel and verify that the editor is displaying the contents of the TouchMotionViewController.h file. Ctrl-click on the same label object and drag to a position just below the @interface line in the Assistant Editor. Release the line and in the resulting connection dialog establish an outlet connection named xCoord. Repeat this step to establish an outlet connection to the second label object named yCoord.
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">