Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added check mark recognizer

  • Loading branch information...
commit c2be8a706a37f9627dffcc75015587cc1fa6786d 1 parent 923872f
Mark Dalrymple authored
Showing with 32 additions and 2 deletions.
  1. +18 −2 Classes/BWViewController.m
  2. +14 −0 GestureLab.xcodeproj/project.pbxproj
View
20 Classes/BWViewController.m
@@ -8,6 +8,8 @@
#import "BWViewController.h"
+#import "BIDCheckMarkGestureRecognizer.h"
+
#import "BWGestureTrackView.h"
#import "BWLoggingTextView.h"
#import "BWTimeScrubberView.h"
@@ -81,6 +83,10 @@ - (void) addSomeGestures {
UIPanGestureRecognizer *panny =
[[UIPanGestureRecognizer alloc] initWithTarget: self
action: @selector(panny:)];
+
+ BIDCheckMarkGestureRecognizer *checky =
+ [[BIDCheckMarkGestureRecognizer alloc] initWithTarget: self
+ action: @selector(checky:)];
__unused BWGestureWrapper *longPressWrapped =
[BWGestureWrapper wrapperWithGestureRecognizer: longPress];
@@ -90,11 +96,14 @@ - (void) addSomeGestures {
[BWGestureWrapper wrapperWithGestureRecognizer: twoTap];
__unused BWGestureWrapper *pannyWrapped =
[BWGestureWrapper wrapperWithGestureRecognizer: panny];
+ __unused BWGestureWrapper *checkyWrapped =
+ [BWGestureWrapper wrapperWithGestureRecognizer: checky];
longPressWrapped.delegate = self;
pinchyWrapped.delegate = self;
twoTapWrapped.delegate = self;
pannyWrapped.delegate = self;
+ checkyWrapped.delegate = self;
//[self.touchTrackView addGestureRecognizer: longPress];
// [self.touchTrackView addGestureRecognizer: twoTap];
@@ -102,7 +111,8 @@ - (void) addSomeGestures {
[self.touchTrackView addGestureRecognizer: (id)longPressWrapped];
[self.touchTrackView addGestureRecognizer: (id)twoTapWrapped];
[self.touchTrackView addGestureRecognizer: (id)pinchyWrapped];
- [self.touchTrackView addGestureRecognizer: (id)pannyWrapped];
+ [self.touchTrackView addGestureRecognizer: (id)checkyWrapped];
+ // [self.touchTrackView addGestureRecognizer: (id)pannyWrapped];
[self.gestureTrackView removeAllRecognizers];
// [self.gestureTrackView trackGestureRecognizer: longPress];
@@ -111,7 +121,8 @@ - (void) addSomeGestures {
[self.gestureTrackView trackGestureRecognizer: (id)longPressWrapped];
[self.gestureTrackView trackGestureRecognizer: (id)twoTapWrapped];
[self.gestureTrackView trackGestureRecognizer: (id)pinchyWrapped];
- [self.gestureTrackView trackGestureRecognizer: (id)pannyWrapped];
+ // [self.gestureTrackView trackGestureRecognizer: (id)pannyWrapped];
+ [self.gestureTrackView trackGestureRecognizer: (id)checkyWrapped];
} // addSomeGestures
@@ -136,6 +147,11 @@ - (void) panny: (UIPanGestureRecognizer *) panny {
} // panny
+- (void) checky: (BIDCheckMarkGestureRecognizer *) checky {
+ QuietLog (@"CHECKY");
+} // panny
+
+
- (void) timeScrubber: (BWTimeScrubberView *) scrubbed
scrubbedToTime: (NSTimeInterval) time {
[self.touchTrackView drawUpToTimestamp: time];
View
14 GestureLab.xcodeproj/project.pbxproj
@@ -24,6 +24,7 @@
7D28FBD31625E93F00AEF374 /* QuietLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D28FBD21625E93F00AEF374 /* QuietLog.m */; };
7D28FBD61625FC0C00AEF374 /* BWGestureTrackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D28FBD51625FC0C00AEF374 /* BWGestureTrackView.m */; };
7D28FDF0162B1BD200AEF374 /* BWGestureWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D28FDEE162B1BD200AEF374 /* BWGestureWrapper.m */; };
+ 7D28FDF5162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D28FDF4162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -57,6 +58,8 @@
7D28FBD51625FC0C00AEF374 /* BWGestureTrackView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BWGestureTrackView.m; path = Classes/BWGestureTrackView.m; sourceTree = SOURCE_ROOT; };
7D28FDEE162B1BD200AEF374 /* BWGestureWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BWGestureWrapper.m; path = Classes/BWGestureWrapper.m; sourceTree = SOURCE_ROOT; };
7D28FDEF162B1BD200AEF374 /* BWGestureWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BWGestureWrapper.h; path = Classes/BWGestureWrapper.h; sourceTree = SOURCE_ROOT; };
+ 7D28FDF3162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BIDCheckMarkGestureRecognizer.h; path = Classes/BIDCheckMarkGestureRecognizer.h; sourceTree = "<group>"; };
+ 7D28FDF4162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BIDCheckMarkGestureRecognizer.m; path = Classes/BIDCheckMarkGestureRecognizer.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -76,6 +79,7 @@
7D28FB7F16248F3000AEF374 = {
isa = PBXGroup;
children = (
+ 7D28FDF2162B6E3100AEF374 /* Custom Recognizers */,
7D28FB9416248F3000AEF374 /* GestureLab */,
7D28FB8D16248F3000AEF374 /* Frameworks */,
7D28FB8B16248F3000AEF374 /* Products */,
@@ -141,6 +145,15 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ 7D28FDF2162B6E3100AEF374 /* Custom Recognizers */ = {
+ isa = PBXGroup;
+ children = (
+ 7D28FDF3162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.h */,
+ 7D28FDF4162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.m */,
+ );
+ name = "Custom Recognizers";
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -217,6 +230,7 @@
7D28FBD31625E93F00AEF374 /* QuietLog.m in Sources */,
7D28FBD61625FC0C00AEF374 /* BWGestureTrackView.m in Sources */,
7D28FDF0162B1BD200AEF374 /* BWGestureWrapper.m in Sources */,
+ 7D28FDF5162B6E4D00AEF374 /* BIDCheckMarkGestureRecognizer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Please sign in to comment.
Something went wrong with that request. Please try again.