Skip to content
Browse files

nice little demo of how to use UIGestureRecognizers via IB, image set…

… to be interactive and multitouch (otherwise it ignores gestures)
  • Loading branch information...
1 parent 129642e commit 17a25c778fe2bc7a2bc4ecf1c47d02c568d3098f @davekapp committed
View
16 GestureTest.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
4EE62D1114E8CD7A000C4928 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EE62CEF14E8CD7A000C4928 /* Foundation.framework */; };
4EE62D1914E8CD7A000C4928 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4EE62D1714E8CD7A000C4928 /* InfoPlist.strings */; };
4EE62D1C14E8CD7A000C4928 /* GestureTestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EE62D1B14E8CD7A000C4928 /* GestureTestTests.m */; };
+ 4EE62D2614E8CDA7000C4928 /* halp.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EE62D2514E8CDA7000C4928 /* halp.png */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -38,22 +39,23 @@
4EE62CED14E8CD7A000C4928 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
4EE62CEF14E8CD7A000C4928 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4EE62CF114E8CD7A000C4928 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- 4EE62CF514E8CD7A000C4928 /* GestureTest-Info.plist */ = {isa = PBXFileReference; path = "GestureTest-Info.plist"; sourceTree = "<group>"; };
+ 4EE62CF514E8CD7A000C4928 /* GestureTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GestureTest-Info.plist"; sourceTree = "<group>"; };
4EE62CF714E8CD7A000C4928 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
4EE62CF914E8CD7A000C4928 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 4EE62CFB14E8CD7A000C4928 /* GestureTest-Prefix.pch */ = {isa = PBXFileReference; path = "GestureTest-Prefix.pch"; sourceTree = "<group>"; };
- 4EE62CFC14E8CD7A000C4928 /* AppDelegate.h */ = {isa = PBXFileReference; path = AppDelegate.h; sourceTree = "<group>"; };
+ 4EE62CFB14E8CD7A000C4928 /* GestureTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GestureTest-Prefix.pch"; sourceTree = "<group>"; };
+ 4EE62CFC14E8CD7A000C4928 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4EE62CFD14E8CD7A000C4928 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4EE62D0014E8CD7A000C4928 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
4EE62D0314E8CD7A000C4928 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
- 4EE62D0514E8CD7A000C4928 /* ViewController.h */ = {isa = PBXFileReference; path = ViewController.h; sourceTree = "<group>"; };
+ 4EE62D0514E8CD7A000C4928 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
4EE62D0614E8CD7A000C4928 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
4EE62D0D14E8CD7A000C4928 /* GestureTestTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GestureTestTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
4EE62D0E14E8CD7A000C4928 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
- 4EE62D1614E8CD7A000C4928 /* GestureTestTests-Info.plist */ = {isa = PBXFileReference; path = "GestureTestTests-Info.plist"; sourceTree = "<group>"; };
+ 4EE62D1614E8CD7A000C4928 /* GestureTestTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GestureTestTests-Info.plist"; sourceTree = "<group>"; };
4EE62D1814E8CD7A000C4928 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 4EE62D1A14E8CD7A000C4928 /* GestureTestTests.h */ = {isa = PBXFileReference; path = GestureTestTests.h; sourceTree = "<group>"; };
+ 4EE62D1A14E8CD7A000C4928 /* GestureTestTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GestureTestTests.h; sourceTree = "<group>"; };
4EE62D1B14E8CD7A000C4928 /* GestureTestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GestureTestTests.m; sourceTree = "<group>"; };
+ 4EE62D2514E8CDA7000C4928 /* halp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = halp.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -119,6 +121,7 @@
4EE62D0214E8CD7A000C4928 /* MainStoryboard_iPad.storyboard */,
4EE62D0514E8CD7A000C4928 /* ViewController.h */,
4EE62D0614E8CD7A000C4928 /* ViewController.m */,
+ 4EE62D2514E8CDA7000C4928 /* halp.png */,
4EE62CF414E8CD7A000C4928 /* Supporting Files */,
);
path = GestureTest;
@@ -227,6 +230,7 @@
4EE62CF814E8CD7A000C4928 /* InfoPlist.strings in Resources */,
4EE62D0114E8CD7A000C4928 /* MainStoryboard_iPhone.storyboard in Resources */,
4EE62D0414E8CD7A000C4928 /* MainStoryboard_iPad.storyboard in Resources */,
+ 4EE62D2614E8CDA7000C4928 /* halp.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
7 GestureTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:GestureTest.xcodeproj">
+ </FileRef>
+</Workspace>
View
BIN ...deproj/project.xcworkspace/xcuserdata/davekapp.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
94 GestureTest.xcodeproj/xcuserdata/davekapp.xcuserdatad/xcschemes/GestureTest.xcscheme
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4EE62CE814E8CD79000C4928"
+ BuildableName = "GestureTest.app"
+ BlueprintName = "GestureTest"
+ ReferencedContainer = "container:GestureTest.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4EE62D0C14E8CD7A000C4928"
+ BuildableName = "GestureTestTests.octest"
+ BlueprintName = "GestureTestTests"
+ ReferencedContainer = "container:GestureTest.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4EE62CE814E8CD79000C4928"
+ BuildableName = "GestureTest.app"
+ BlueprintName = "GestureTest"
+ ReferencedContainer = "container:GestureTest.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4EE62CE814E8CD79000C4928"
+ BuildableName = "GestureTest.app"
+ BlueprintName = "GestureTest"
+ ReferencedContainer = "container:GestureTest.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "4EE62CE814E8CD79000C4928"
+ BuildableName = "GestureTest.app"
+ BlueprintName = "GestureTest"
+ ReferencedContainer = "container:GestureTest.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
View
27 GestureTest.xcodeproj/xcuserdata/davekapp.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>GestureTest.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>4EE62CE814E8CD79000C4928</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>4EE62D0C14E8CD7A000C4928</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
9 GestureTest/ViewController.h
@@ -9,5 +9,14 @@
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
+@property (weak, nonatomic) IBOutlet UILabel *outputLabel;
+@property (weak, nonatomic) IBOutlet UIImageView *imageView;
+- (IBAction)wasTapped:(id)sender;
+- (IBAction)wasSwiped:(id)sender;
+- (IBAction)wasPinched:(id)sender;
+- (IBAction)wasRotated:(id)sender;
+
+- (BOOL)canBecomeFirstResponder;
+- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event;
@end
View
74 GestureTest/ViewController.m
@@ -8,7 +8,14 @@
#import "ViewController.h"
+#define kImageOriginX 94.0
+#define kImageOriginY 330.0
+#define kImageWidth 132.0
+#define kImageHeight 117.0
+
@implementation ViewController
+@synthesize outputLabel;
+@synthesize imageView;
- (void)didReceiveMemoryWarning
{
@@ -26,6 +33,8 @@ - (void)viewDidLoad
- (void)viewDidUnload
{
+ [self setOutputLabel:nil];
+ [self setImageView:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
@@ -39,6 +48,7 @@ - (void)viewWillAppear:(BOOL)animated
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
+ [self becomeFirstResponder];
}
- (void)viewWillDisappear:(BOOL)animated
@@ -61,4 +71,68 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
}
}
+- (IBAction)wasTapped:(id)sender {
+ UITapGestureRecognizer *recognizer = (UITapGestureRecognizer*)sender;
+ CGPoint location = [recognizer locationInView:[recognizer view]];
+ self.outputLabel.text = [NSString stringWithFormat:@"Tapped @ [%f, %f]!", location.x, location.y];
+}
+
+- (IBAction)wasSwiped:(id)sender {
+ self.outputLabel.text = @"Swiped!";
+}
+
+- (IBAction)wasPinched:(id)sender {
+ UIPinchGestureRecognizer *recognizer = (UIPinchGestureRecognizer*)sender;
+ NSString *output;
+ float scale = recognizer.scale;
+ self.imageView.transform = CGAffineTransformMakeRotation(0.0); // resetting rotation on zoom
+
+ output = [NSString stringWithFormat:@"Pinched w/scale:%1.2f velocity:%1.2f", scale, recognizer.velocity];
+ self.outputLabel.text = output;
+
+ // now set the frame w/the scale to change the image size
+ self.imageView.frame = CGRectMake(kImageOriginX, kImageOriginY, kImageWidth * scale, kImageHeight * scale);
+}
+
+- (IBAction)wasRotated:(id)sender {
+ UIRotationGestureRecognizer *recognizer = (UIRotationGestureRecognizer*)sender;
+ float rotation = recognizer.rotation;
+
+ NSString *output = [NSString stringWithFormat:@"Rotated w/radians:%1.2f, velocity:%1.2f", rotation, recognizer.velocity];
+ self.outputLabel.text = output;
+
+ // now do the actual rotation by setting a transform (which takes radians, so no math needed on our part
+ self.imageView.transform = CGAffineTransformMakeRotation(rotation);
+}
+
+- (BOOL)canBecomeFirstResponder {
+ return YES;
+}
+
+- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
+ if (motion == UIEventSubtypeMotionShake) {
+ self.outputLabel.text = @"Things are shakin' here!";
+ self.imageView.transform = CGAffineTransformMakeRotation(0.0);
+ self.imageView.frame = CGRectMake(kImageOriginX, kImageOriginY, kImageWidth, kImageHeight);
+ }
+}
@end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
View
145 GestureTest/en.lproj/MainStoryboard_iPhone.storyboard
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1906" systemVersion="11A511" targetRuntime="iOS.CocoaTouch" nextObjectID="6" propertyAccessControl="none" initialViewController="2">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
<dependencies>
<development defaultVersion="4200" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="902"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="933"/>
</dependencies>
<scenes>
<scene sceneID="5">
@@ -12,13 +12,152 @@
<view key="view" contentMode="scaleToFill" id="3">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <subviews/>
+ <subviews>
+ <view contentMode="scaleToFill" id="yhb-Dz-7ax" userLabel="tapView">
+ <rect key="frame" x="20" y="54" width="78" height="47"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Tap!" lineBreakMode="tailTruncation" minimumFontSize="10" id="eGq-RQ-gPt">
+ <rect key="frame" x="23" y="13" width="33" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" red="0.80739092940000001" green="1" blue="0.76990390080000004" alpha="1" colorSpace="calibratedRGB"/>
+ <gestureRecognizers/>
+ <connections>
+ <outletCollection property="gestureRecognizers" destination="HFf-da-GDQ" appends="YES" id="aUw-Si-YuF"/>
+ </connections>
+ </view>
+ <view contentMode="scaleToFill" id="cDn-Nb-qcq" userLabel="swipeView">
+ <rect key="frame" x="114" y="54" width="186" height="47"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Swipe!" lineBreakMode="tailTruncation" minimumFontSize="10" id="1Bh-sJ-1AB">
+ <rect key="frame" x="67" y="13" width="52" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" red="0.40000000600000002" green="0.80000001190000003" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <gestureRecognizers/>
+ <connections>
+ <outletCollection property="gestureRecognizers" destination="kE5-lG-QjW" appends="YES" id="FR7-bG-m7H"/>
+ </connections>
+ </view>
+ <view contentMode="scaleToFill" id="td8-hF-Xj7" userLabel="pinchView">
+ <rect key="frame" x="20" y="109" width="280" height="88"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Pinch!" lineBreakMode="tailTruncation" minimumFontSize="10" id="uzG-bu-I5P">
+ <rect key="frame" x="116" y="33" width="48" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" red="1" green="0.0" blue="0.054199093339398097" alpha="0.65000000000000002" colorSpace="calibratedRGB"/>
+ <gestureRecognizers/>
+ <connections>
+ <outletCollection property="gestureRecognizers" destination="x7x-Yz-4gX" appends="YES" id="uov-C0-HvP"/>
+ </connections>
+ </view>
+ <view contentMode="scaleToFill" id="Nim-mu-jp7" userLabel="rotateView">
+ <rect key="frame" x="20" y="205" width="280" height="93"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Rotate!" lineBreakMode="tailTruncation" minimumFontSize="10" id="qa1-ga-6BR">
+ <rect key="frame" x="113" y="36" width="55" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" red="1" green="0.97463529375031466" blue="0.00019371711026683336" alpha="0.52000000000000002" colorSpace="calibratedRGB"/>
+ <gestureRecognizers/>
+ <connections>
+ <outletCollection property="gestureRecognizers" destination="9TY-az-xW0" appends="YES" id="pEk-Eu-b1F"/>
+ </connections>
+ </view>
+ <imageView multipleTouchEnabled="YES" contentMode="scaleToFill" image="halp.png" id="5jQ-pM-Ra5">
+ <rect key="frame" x="51" y="306" width="218" height="134"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <gestureRecognizers/>
+ <connections>
+ <outletCollection property="gestureRecognizers" destination="OlZ-BB-0o1" appends="YES" id="8Wr-VW-04K"/>
+ <outletCollection property="gestureRecognizers" destination="dQO-QT-5U4" appends="YES" id="ZLz-Ks-AhQ"/>
+ </connections>
+ </imageView>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Touch something!" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="ASP-Il-A5p">
+ <rect key="frame" x="51" y="20" width="218" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
+ <connections>
+ <outlet property="imageView" destination="5jQ-pM-Ra5" id="nyH-8j-pxE"/>
+ <outlet property="outputLabel" destination="ASP-Il-A5p" id="WoX-5s-bNg"/>
+ </connections>
</viewController>
+ <tapGestureRecognizer id="HFf-da-GDQ">
+ <connections>
+ <action selector="wasTapped:" destination="2" id="DWu-Pf-iyj"/>
+ </connections>
+ </tapGestureRecognizer>
+ <swipeGestureRecognizer direction="right" id="kE5-lG-QjW">
+ <connections>
+ <action selector="wasSwiped:" destination="2" id="0b8-IC-fyg"/>
+ </connections>
+ </swipeGestureRecognizer>
+ <pinchGestureRecognizer id="x7x-Yz-4gX">
+ <connections>
+ <action selector="wasPinched:" destination="2" id="zdy-bf-jZ5"/>
+ </connections>
+ </pinchGestureRecognizer>
+ <rotationGestureRecognizer id="9TY-az-xW0">
+ <connections>
+ <action selector="wasRotated:" destination="2" id="fcC-cf-gi8"/>
+ </connections>
+ </rotationGestureRecognizer>
+ <pinchGestureRecognizer id="OlZ-BB-0o1" userLabel="imageDirectPinch">
+ <connections>
+ <action selector="wasPinched:" destination="2" id="6qY-kz-hzj"/>
+ </connections>
+ </pinchGestureRecognizer>
+ <rotationGestureRecognizer id="dQO-QT-5U4" userLabel="imageDirectRotation">
+ <connections>
+ <action selector="wasRotated:" destination="2" id="Maq-Dq-STA"/>
+ </connections>
+ </rotationGestureRecognizer>
</objects>
</scene>
</scenes>
+ <resources>
+ <image name="halp.png" width="500" height="358"/>
+ </resources>
+ <classes>
+ <class className="ViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="wasPinched:"/>
+ <relationship kind="action" name="wasRotated:"/>
+ <relationship kind="action" name="wasSwiped:"/>
+ <relationship kind="action" name="wasTapped:"/>
+ <relationship kind="outlet" name="imageView" candidateClass="UIImageView"/>
+ <relationship kind="outlet" name="outputLabel" candidateClass="UILabel"/>
+ </relationships>
+ </class>
+ </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
View
BIN GestureTest/halp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 17a25c7

Please sign in to comment.
Something went wrong with that request. Please try again.