├── KTOneFingerRotationGestureRecognizer.h ├── KTOneFingerRotationGestureRecognizer.m ├── KnobSample ├── KnobSample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── KnobSample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── KnobSample-Info.plist │ ├── KnobSample-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── ViewController.xib │ ├── knob.acorn │ ├── knob.png │ ├── knob@2x.png │ └── main.m ├── LICENSE ├── OneFingerRotation.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── OneFingerRotation ├── Classes │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── RootViewController.h │ └── RootViewController.m ├── Info.plist ├── Prefix.pch ├── en.lproj │ └── InfoPlist.strings ├── images │ ├── astroland.jpg │ ├── subway.jpg │ └── tower.jpg ├── main.m └── xibs │ ├── MainWindow_iPad.xib │ ├── MainWindow_iPhone.xib │ ├── RootView~ipad.xib │ └── RootView~iphone.xib └── README.md /KTOneFingerRotationGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // KTOneFingerRotationGestureRecognizer.h 3 | // 4 | // Created by Kirby Turner on 4/22/11. 5 | // Copyright 2011 White Peak Software Inc. All rights reserved. 6 | // 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | 30 | @interface KTOneFingerRotationGestureRecognizer : UIGestureRecognizer 31 | { 32 | 33 | } 34 | 35 | /** 36 | The rotation of the gesture in radians since its last change. 37 | */ 38 | @property (nonatomic, assign) CGFloat rotation; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /KTOneFingerRotationGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | // 2 | // KTOneFingerRotationGestureRecognizer.m 3 | // 4 | // Created by Kirby Turner on 4/22/11. 5 | // Copyright 2011 White Peak Software Inc. All rights reserved. 6 | // 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import "KTOneFingerRotationGestureRecognizer.h" 28 | #import 29 | 30 | 31 | @implementation KTOneFingerRotationGestureRecognizer 32 | 33 | @synthesize rotation = rotation_; 34 | 35 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 36 | { 37 | // Fail when more than 1 finger detected. 38 | if ([[event touchesForGestureRecognizer:self] count] > 1) { 39 | [self setState:UIGestureRecognizerStateFailed]; 40 | } 41 | } 42 | 43 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 44 | { 45 | if ([self state] == UIGestureRecognizerStatePossible) { 46 | [self setState:UIGestureRecognizerStateBegan]; 47 | } else { 48 | [self setState:UIGestureRecognizerStateChanged]; 49 | } 50 | 51 | // We can look at any touch object since we know we 52 | // have only 1. If there were more than 1 then 53 | // touchesBegan:withEvent: would have failed the recognizer. 54 | UITouch *touch = [touches anyObject]; 55 | 56 | // To rotate with one finger, we simulate a second finger. 57 | // The second figure is on the opposite side of the virtual 58 | // circle that represents the rotation gesture. 59 | 60 | UIView *view = [self view]; 61 | CGPoint center = CGPointMake(CGRectGetMidX([view bounds]), CGRectGetMidY([view bounds])); 62 | CGPoint currentTouchPoint = [touch locationInView:view]; 63 | CGPoint previousTouchPoint = [touch previousLocationInView:view]; 64 | 65 | CGFloat angleInRadians = atan2f(currentTouchPoint.y - center.y, currentTouchPoint.x - center.x) - atan2f(previousTouchPoint.y - center.y, previousTouchPoint.x - center.x); 66 | 67 | [self setRotation:angleInRadians]; 68 | } 69 | 70 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 71 | { 72 | // Perform final check to make sure a tap was not misinterpreted. 73 | if ([self state] == UIGestureRecognizerStateChanged) { 74 | [self setState:UIGestureRecognizerStateEnded]; 75 | } else { 76 | [self setState:UIGestureRecognizerStateFailed]; 77 | } 78 | } 79 | 80 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 81 | { 82 | [self setState:UIGestureRecognizerStateFailed]; 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /KnobSample/KnobSample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 680C9EA414FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 680C9EA314FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.m */; }; 11 | 6857946714FF674400D75FFB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6857946614FF674400D75FFB /* UIKit.framework */; }; 12 | 6857946914FF674400D75FFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6857946814FF674400D75FFB /* Foundation.framework */; }; 13 | 6857946B14FF674400D75FFB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6857946A14FF674400D75FFB /* CoreGraphics.framework */; }; 14 | 6857947114FF674400D75FFB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6857946F14FF674400D75FFB /* InfoPlist.strings */; }; 15 | 6857947314FF674400D75FFB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6857947214FF674400D75FFB /* main.m */; }; 16 | 6857947714FF674400D75FFB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6857947614FF674400D75FFB /* AppDelegate.m */; }; 17 | 6857947A14FF674400D75FFB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6857947914FF674400D75FFB /* ViewController.m */; }; 18 | 6857947D14FF674400D75FFB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6857947B14FF674400D75FFB /* ViewController.xib */; }; 19 | 6857948514FF67E100D75FFB /* knob.png in Resources */ = {isa = PBXBuildFile; fileRef = 6857948314FF67E100D75FFB /* knob.png */; }; 20 | 6857948614FF67E100D75FFB /* knob@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6857948414FF67E100D75FFB /* knob@2x.png */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 680C9EA214FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KTOneFingerRotationGestureRecognizer.h; path = ../../KTOneFingerRotationGestureRecognizer.h; sourceTree = ""; }; 25 | 680C9EA314FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KTOneFingerRotationGestureRecognizer.m; path = ../../KTOneFingerRotationGestureRecognizer.m; sourceTree = ""; }; 26 | 6857946214FF674400D75FFB /* KnobSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KnobSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 6857946614FF674400D75FFB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 28 | 6857946814FF674400D75FFB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 6857946A14FF674400D75FFB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 6857946E14FF674400D75FFB /* KnobSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "KnobSample-Info.plist"; sourceTree = ""; }; 31 | 6857947014FF674400D75FFB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 32 | 6857947214FF674400D75FFB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 6857947414FF674400D75FFB /* KnobSample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "KnobSample-Prefix.pch"; sourceTree = ""; }; 34 | 6857947514FF674400D75FFB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 6857947614FF674400D75FFB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 6857947814FF674400D75FFB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | 6857947914FF674400D75FFB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | 6857947C14FF674400D75FFB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 39 | 6857948314FF67E100D75FFB /* knob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = knob.png; sourceTree = ""; }; 40 | 6857948414FF67E100D75FFB /* knob@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "knob@2x.png"; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 6857945F14FF674400D75FFB /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | 6857946714FF674400D75FFB /* UIKit.framework in Frameworks */, 49 | 6857946914FF674400D75FFB /* Foundation.framework in Frameworks */, 50 | 6857946B14FF674400D75FFB /* CoreGraphics.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | 6857945714FF674300D75FFB = { 58 | isa = PBXGroup; 59 | children = ( 60 | 6857946C14FF674400D75FFB /* KnobSample */, 61 | 6857946514FF674400D75FFB /* Frameworks */, 62 | 6857946314FF674400D75FFB /* Products */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | 6857946314FF674400D75FFB /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 6857946214FF674400D75FFB /* KnobSample.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | 6857946514FF674400D75FFB /* Frameworks */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 6857946614FF674400D75FFB /* UIKit.framework */, 78 | 6857946814FF674400D75FFB /* Foundation.framework */, 79 | 6857946A14FF674400D75FFB /* CoreGraphics.framework */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 6857946C14FF674400D75FFB /* KnobSample */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 6857947514FF674400D75FFB /* AppDelegate.h */, 88 | 6857947614FF674400D75FFB /* AppDelegate.m */, 89 | 6857947814FF674400D75FFB /* ViewController.h */, 90 | 6857947914FF674400D75FFB /* ViewController.m */, 91 | 6857947B14FF674400D75FFB /* ViewController.xib */, 92 | 6857948314FF67E100D75FFB /* knob.png */, 93 | 6857948414FF67E100D75FFB /* knob@2x.png */, 94 | 680C9EA214FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.h */, 95 | 680C9EA314FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.m */, 96 | 6857946D14FF674400D75FFB /* Supporting Files */, 97 | ); 98 | path = KnobSample; 99 | sourceTree = ""; 100 | }; 101 | 6857946D14FF674400D75FFB /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6857946E14FF674400D75FFB /* KnobSample-Info.plist */, 105 | 6857946F14FF674400D75FFB /* InfoPlist.strings */, 106 | 6857947214FF674400D75FFB /* main.m */, 107 | 6857947414FF674400D75FFB /* KnobSample-Prefix.pch */, 108 | ); 109 | name = "Supporting Files"; 110 | sourceTree = ""; 111 | }; 112 | /* End PBXGroup section */ 113 | 114 | /* Begin PBXNativeTarget section */ 115 | 6857946114FF674400D75FFB /* KnobSample */ = { 116 | isa = PBXNativeTarget; 117 | buildConfigurationList = 6857948014FF674400D75FFB /* Build configuration list for PBXNativeTarget "KnobSample" */; 118 | buildPhases = ( 119 | 6857945E14FF674400D75FFB /* Sources */, 120 | 6857945F14FF674400D75FFB /* Frameworks */, 121 | 6857946014FF674400D75FFB /* Resources */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = KnobSample; 128 | productName = KnobSample; 129 | productReference = 6857946214FF674400D75FFB /* KnobSample.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 6857945914FF674300D75FFB /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 0430; 139 | ORGANIZATIONNAME = "White Peak Software Inc."; 140 | }; 141 | buildConfigurationList = 6857945C14FF674300D75FFB /* Build configuration list for PBXProject "KnobSample" */; 142 | compatibilityVersion = "Xcode 3.2"; 143 | developmentRegion = English; 144 | hasScannedForEncodings = 0; 145 | knownRegions = ( 146 | en, 147 | ); 148 | mainGroup = 6857945714FF674300D75FFB; 149 | productRefGroup = 6857946314FF674400D75FFB /* Products */; 150 | projectDirPath = ""; 151 | projectRoot = ""; 152 | targets = ( 153 | 6857946114FF674400D75FFB /* KnobSample */, 154 | ); 155 | }; 156 | /* End PBXProject section */ 157 | 158 | /* Begin PBXResourcesBuildPhase section */ 159 | 6857946014FF674400D75FFB /* Resources */ = { 160 | isa = PBXResourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 6857947114FF674400D75FFB /* InfoPlist.strings in Resources */, 164 | 6857947D14FF674400D75FFB /* ViewController.xib in Resources */, 165 | 6857948514FF67E100D75FFB /* knob.png in Resources */, 166 | 6857948614FF67E100D75FFB /* knob@2x.png in Resources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXResourcesBuildPhase section */ 171 | 172 | /* Begin PBXSourcesBuildPhase section */ 173 | 6857945E14FF674400D75FFB /* Sources */ = { 174 | isa = PBXSourcesBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | 6857947314FF674400D75FFB /* main.m in Sources */, 178 | 6857947714FF674400D75FFB /* AppDelegate.m in Sources */, 179 | 6857947A14FF674400D75FFB /* ViewController.m in Sources */, 180 | 680C9EA414FF68FA003993A5 /* KTOneFingerRotationGestureRecognizer.m in Sources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXSourcesBuildPhase section */ 185 | 186 | /* Begin PBXVariantGroup section */ 187 | 6857946F14FF674400D75FFB /* InfoPlist.strings */ = { 188 | isa = PBXVariantGroup; 189 | children = ( 190 | 6857947014FF674400D75FFB /* en */, 191 | ); 192 | name = InfoPlist.strings; 193 | sourceTree = ""; 194 | }; 195 | 6857947B14FF674400D75FFB /* ViewController.xib */ = { 196 | isa = PBXVariantGroup; 197 | children = ( 198 | 6857947C14FF674400D75FFB /* en */, 199 | ); 200 | name = ViewController.xib; 201 | sourceTree = ""; 202 | }; 203 | /* End PBXVariantGroup section */ 204 | 205 | /* Begin XCBuildConfiguration section */ 206 | 6857947E14FF674400D75FFB /* Debug */ = { 207 | isa = XCBuildConfiguration; 208 | buildSettings = { 209 | ALWAYS_SEARCH_USER_PATHS = NO; 210 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 211 | CLANG_ENABLE_OBJC_ARC = YES; 212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 213 | COPY_PHASE_STRIP = NO; 214 | GCC_C_LANGUAGE_STANDARD = gnu99; 215 | GCC_DYNAMIC_NO_PIC = NO; 216 | GCC_OPTIMIZATION_LEVEL = 0; 217 | GCC_PREPROCESSOR_DEFINITIONS = ( 218 | "DEBUG=1", 219 | "$(inherited)", 220 | ); 221 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 222 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 224 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 225 | GCC_WARN_UNUSED_VARIABLE = YES; 226 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 227 | SDKROOT = iphoneos; 228 | }; 229 | name = Debug; 230 | }; 231 | 6857947F14FF674400D75FFB /* Release */ = { 232 | isa = XCBuildConfiguration; 233 | buildSettings = { 234 | ALWAYS_SEARCH_USER_PATHS = NO; 235 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 236 | CLANG_ENABLE_OBJC_ARC = YES; 237 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 238 | COPY_PHASE_STRIP = YES; 239 | GCC_C_LANGUAGE_STANDARD = gnu99; 240 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 241 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 242 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 243 | GCC_WARN_UNUSED_VARIABLE = YES; 244 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 245 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 246 | SDKROOT = iphoneos; 247 | VALIDATE_PRODUCT = YES; 248 | }; 249 | name = Release; 250 | }; 251 | 6857948114FF674400D75FFB /* Debug */ = { 252 | isa = XCBuildConfiguration; 253 | buildSettings = { 254 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 255 | GCC_PREFIX_HEADER = "KnobSample/KnobSample-Prefix.pch"; 256 | INFOPLIST_FILE = "KnobSample/KnobSample-Info.plist"; 257 | PRODUCT_NAME = "$(TARGET_NAME)"; 258 | WRAPPER_EXTENSION = app; 259 | }; 260 | name = Debug; 261 | }; 262 | 6857948214FF674400D75FFB /* Release */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 266 | GCC_PREFIX_HEADER = "KnobSample/KnobSample-Prefix.pch"; 267 | INFOPLIST_FILE = "KnobSample/KnobSample-Info.plist"; 268 | PRODUCT_NAME = "$(TARGET_NAME)"; 269 | WRAPPER_EXTENSION = app; 270 | }; 271 | name = Release; 272 | }; 273 | /* End XCBuildConfiguration section */ 274 | 275 | /* Begin XCConfigurationList section */ 276 | 6857945C14FF674300D75FFB /* Build configuration list for PBXProject "KnobSample" */ = { 277 | isa = XCConfigurationList; 278 | buildConfigurations = ( 279 | 6857947E14FF674400D75FFB /* Debug */, 280 | 6857947F14FF674400D75FFB /* Release */, 281 | ); 282 | defaultConfigurationIsVisible = 0; 283 | defaultConfigurationName = Release; 284 | }; 285 | 6857948014FF674400D75FFB /* Build configuration list for PBXNativeTarget "KnobSample" */ = { 286 | isa = XCConfigurationList; 287 | buildConfigurations = ( 288 | 6857948114FF674400D75FFB /* Debug */, 289 | 6857948214FF674400D75FFB /* Release */, 290 | ); 291 | defaultConfigurationIsVisible = 0; 292 | defaultConfigurationName = Release; 293 | }; 294 | /* End XCConfigurationList section */ 295 | }; 296 | rootObject = 6857945914FF674300D75FFB /* Project object */; 297 | } 298 | -------------------------------------------------------------------------------- /KnobSample/KnobSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | ** KnobSample 3 | ** 4 | ** Created by Kirby Turner. 5 | ** Copyright (c) 2012 White Peak Software. All rights reserved. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining 8 | ** a copy of this software and associated documentation files (the 9 | ** "Software"), to deal in the Software without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Software, and to permit 12 | ** persons to whom the Software is furnished to do so, subject to the 13 | ** following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Software. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | ** 26 | **/ 27 | 28 | #import 29 | 30 | @class ViewController; 31 | 32 | @interface AppDelegate : UIResponder 33 | 34 | @property (strong, nonatomic) UIWindow *window; 35 | 36 | @property (strong, nonatomic) ViewController *viewController; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | ** KnobSample 3 | ** 4 | ** Created by Kirby Turner. 5 | ** Copyright (c) 2012 White Peak Software. All rights reserved. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining 8 | ** a copy of this software and associated documentation files (the 9 | ** "Software"), to deal in the Software without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Software, and to permit 12 | ** persons to whom the Software is furnished to do so, subject to the 13 | ** following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Software. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | ** 26 | **/ 27 | 28 | #import "AppDelegate.h" 29 | 30 | #import "ViewController.h" 31 | 32 | @implementation AppDelegate 33 | 34 | @synthesize window = _window; 35 | @synthesize viewController = _viewController; 36 | 37 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 38 | { 39 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 40 | // Override point for customization after application launch. 41 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; 42 | self.window.rootViewController = self.viewController; 43 | [self.window makeKeyAndVisible]; 44 | return YES; 45 | } 46 | 47 | - (void)applicationWillResignActive:(UIApplication *)application 48 | { 49 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 50 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 51 | } 52 | 53 | - (void)applicationDidEnterBackground:(UIApplication *)application 54 | { 55 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 56 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 57 | } 58 | 59 | - (void)applicationWillEnterForeground:(UIApplication *)application 60 | { 61 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 62 | } 63 | 64 | - (void)applicationDidBecomeActive:(UIApplication *)application 65 | { 66 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 67 | } 68 | 69 | - (void)applicationWillTerminate:(UIApplication *)application 70 | { 71 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/KnobSample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.whitepeaksoftware.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/KnobSample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'KnobSample' target in the 'KnobSample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/ViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | ** KnobSample 3 | ** 4 | ** Created by Kirby Turner. 5 | ** Copyright (c) 2012 White Peak Software. All rights reserved. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining 8 | ** a copy of this software and associated documentation files (the 9 | ** "Software"), to deal in the Software without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Software, and to permit 12 | ** persons to whom the Software is furnished to do so, subject to the 13 | ** following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Software. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | ** 26 | **/ 27 | 28 | #import 29 | 30 | @interface ViewController : UIViewController 31 | 32 | @property (nonatomic, strong) IBOutlet UIImageView *knobImageView; 33 | 34 | - (IBAction)resetKnob:(id)sender; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/ViewController.m: -------------------------------------------------------------------------------- 1 | /** 2 | ** KnobSample 3 | ** 4 | ** Created by Kirby Turner. 5 | ** Copyright (c) 2012 White Peak Software. All rights reserved. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining 8 | ** a copy of this software and associated documentation files (the 9 | ** "Software"), to deal in the Software without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Software, and to permit 12 | ** persons to whom the Software is furnished to do so, subject to the 13 | ** following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Software. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | ** 26 | **/ 27 | 28 | #import "ViewController.h" 29 | #import "KTOneFingerRotationGestureRecognizer.h" 30 | 31 | #define degreesToRadians(x) (M_PI * x / 180.0) 32 | #define radiansToDegrees(x) (x * 180 / M_PI) 33 | 34 | 35 | @interface ViewController () 36 | @property (nonatomic, assign) CGFloat currentAngle; 37 | @property (nonatomic, assign) CGFloat startAngle; 38 | @property (nonatomic, assign) CGFloat stopAngle; 39 | @end 40 | 41 | @implementation ViewController 42 | 43 | @synthesize knobImageView = _knobImageView; 44 | @synthesize currentAngle = _currentAngle; 45 | @synthesize startAngle = _startAngle; 46 | @synthesize stopAngle = _stopAngle; 47 | 48 | - (void)viewDidLoad 49 | { 50 | [super viewDidLoad]; 51 | 52 | KTOneFingerRotationGestureRecognizer *spin = [[KTOneFingerRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotated:)]; 53 | [[self knobImageView] addGestureRecognizer:spin]; 54 | [[self knobImageView] setUserInteractionEnabled:YES]; 55 | 56 | // Allow rotation between the start and stop angles. 57 | [self setStartAngle:-90.0]; 58 | [self setStopAngle:90.0]; 59 | 60 | [self resetKnob:self]; 61 | } 62 | 63 | - (void)rotated:(KTOneFingerRotationGestureRecognizer *)recognizer 64 | { 65 | CGFloat degrees = radiansToDegrees([recognizer rotation]); 66 | CGFloat currentAngle = [self currentAngle] + degrees; 67 | CGFloat relativeAngle = fmodf(currentAngle, 360.0); // Converts to angle between 0 and 360 degrees. 68 | 69 | BOOL shouldRotate = NO; 70 | if ([self startAngle] <= [self stopAngle]) { 71 | shouldRotate = (relativeAngle >= [self startAngle] && relativeAngle <= [self stopAngle]); 72 | } else if ([self startAngle] > [self stopAngle]) { 73 | shouldRotate = (relativeAngle >= [self startAngle] || relativeAngle <= [self stopAngle]); 74 | } 75 | 76 | if (shouldRotate) { 77 | [self setCurrentAngle:currentAngle]; 78 | UIView *view = [recognizer view]; 79 | [view setTransform:CGAffineTransformRotate([view transform], [recognizer rotation])]; 80 | } 81 | } 82 | 83 | - (IBAction)resetKnob:(id)sender 84 | { 85 | CGFloat startAngleInRadians = degreesToRadians([self startAngle]); 86 | [[self knobImageView] setUserInteractionEnabled:NO]; 87 | [UIView animateWithDuration:0.20 animations:^{ 88 | [[self knobImageView] setTransform:CGAffineTransformMakeRotation(startAngleInRadians)]; 89 | } completion:^(BOOL finished) { 90 | [[self knobImageView] setUserInteractionEnabled:YES]; 91 | [self setCurrentAngle:[self startAngle]]; 92 | }]; 93 | } 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1280 5 | 11D50b 6 | 2177 7 | 1138.32 8 | 568.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1173 12 | 13 | 14 | IBUIButton 15 | IBUIImageView 16 | IBUIView 17 | IBProxyObject 18 | 19 | 20 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 21 | 22 | 23 | PluginDependencyRecalculationVersion 24 | 25 | 26 | 27 | 28 | IBFilesOwner 29 | IBCocoaTouchFramework 30 | 31 | 32 | IBFirstResponder 33 | IBCocoaTouchFramework 34 | 35 | 36 | 37 | 274 38 | 39 | 40 | 41 | 274 42 | {{85, 155}, {150, 150}} 43 | 44 | 45 | 46 | _NS:9 47 | NO 48 | IBCocoaTouchFramework 49 | 50 | NSImage 51 | knob.png 52 | 53 | 54 | 55 | 56 | 292 57 | {{124, 403}, {72, 37}} 58 | 59 | 60 | 61 | _NS:9 62 | NO 63 | IBCocoaTouchFramework 64 | 0 65 | 0 66 | 1 67 | reset 68 | 69 | 3 70 | MQA 71 | 72 | 73 | 1 74 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 75 | 76 | 77 | 3 78 | MC41AA 79 | 80 | 81 | 2 82 | 15 83 | 84 | 85 | Helvetica-Bold 86 | 15 87 | 16 88 | 89 | 90 | 91 | {{0, 20}, {320, 460}} 92 | 93 | 94 | 95 | 96 | 3 97 | MC43NQA 98 | 99 | 2 100 | 101 | 102 | NO 103 | 104 | IBCocoaTouchFramework 105 | 106 | 107 | 108 | 109 | 110 | 111 | view 112 | 113 | 114 | 115 | 7 116 | 117 | 118 | 119 | knobImageView 120 | 121 | 122 | 123 | 9 124 | 125 | 126 | 127 | resetKnob: 128 | 129 | 130 | 7 131 | 132 | 11 133 | 134 | 135 | 136 | 137 | 138 | 0 139 | 140 | 141 | 142 | 143 | 144 | -1 145 | 146 | 147 | File's Owner 148 | 149 | 150 | -2 151 | 152 | 153 | 154 | 155 | 6 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 8 165 | 166 | 167 | 168 | 169 | 10 170 | 171 | 172 | 173 | 174 | 175 | 176 | ViewController 177 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 178 | UIResponder 179 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 180 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 181 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 182 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 183 | 184 | 185 | 186 | 187 | 188 | 11 189 | 190 | 191 | 192 | 193 | ViewController 194 | UIViewController 195 | 196 | resetKnob: 197 | id 198 | 199 | 200 | resetKnob: 201 | 202 | resetKnob: 203 | id 204 | 205 | 206 | 207 | knobImageView 208 | UIImageView 209 | 210 | 211 | knobImageView 212 | 213 | knobImageView 214 | UIImageView 215 | 216 | 217 | 218 | IBProjectSource 219 | ./Classes/ViewController.h 220 | 221 | 222 | 223 | 224 | 0 225 | IBCocoaTouchFramework 226 | YES 227 | 3 228 | 229 | knob.png 230 | {150, 150} 231 | 232 | 1173 233 | 234 | 235 | -------------------------------------------------------------------------------- /KnobSample/KnobSample/knob.acorn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/KnobSample/KnobSample/knob.acorn -------------------------------------------------------------------------------- /KnobSample/KnobSample/knob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/KnobSample/KnobSample/knob.png -------------------------------------------------------------------------------- /KnobSample/KnobSample/knob@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/KnobSample/KnobSample/knob@2x.png -------------------------------------------------------------------------------- /KnobSample/KnobSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // KnobSample 4 | // 5 | // Created by Kirby Turner on 3/1/12. 6 | // Copyright (c) 2012 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011 White Peak Software Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /OneFingerRotation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6830362D13620479000E4EC3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6830362C13620479000E4EC3 /* UIKit.framework */; }; 11 | 6830362F13620479000E4EC3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6830362E13620479000E4EC3 /* Foundation.framework */; }; 12 | 6830363113620479000E4EC3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6830363013620479000E4EC3 /* CoreGraphics.framework */; }; 13 | 6830363713620479000E4EC3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6830363513620479000E4EC3 /* InfoPlist.strings */; }; 14 | 6830363A13620479000E4EC3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6830363913620479000E4EC3 /* main.m */; }; 15 | 6830366A136205DF000E4EC3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 68303665136205DF000E4EC3 /* AppDelegate.m */; }; 16 | 68303670136205EB000E4EC3 /* MainWindow_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6830366E136205EB000E4EC3 /* MainWindow_iPad.xib */; }; 17 | 68303671136205EB000E4EC3 /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6830366F136205EB000E4EC3 /* MainWindow_iPhone.xib */; }; 18 | 683036741362061B000E4EC3 /* astroland.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 683036731362061B000E4EC3 /* astroland.jpg */; }; 19 | 6830367F13620672000E4EC3 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6830367E13620672000E4EC3 /* RootViewController.m */; }; 20 | 6830368113620701000E4EC3 /* RootView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6830368013620700000E4EC3 /* RootView~ipad.xib */; }; 21 | 683036831362092B000E4EC3 /* RootView~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 683036821362092B000E4EC3 /* RootView~iphone.xib */; }; 22 | 686D53891365B04200FFF635 /* subway.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 686D53871365B04200FFF635 /* subway.jpg */; }; 23 | 686D538A1365B04200FFF635 /* tower.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 686D53881365B04200FFF635 /* tower.jpg */; }; 24 | 6876364713621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6876364613621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.m */; }; 25 | 6876364A1362209200B19700 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 687636481362209100B19700 /* LICENSE */; }; 26 | 6876364B1362209200B19700 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 687636491362209200B19700 /* README.md */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 6830362813620479000E4EC3 /* OneFingerRotation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OneFingerRotation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 6830362C13620479000E4EC3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 32 | 6830362E13620479000E4EC3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 33 | 6830363013620479000E4EC3 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 34 | 6830363413620479000E4EC3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 6830363613620479000E4EC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 36 | 6830363813620479000E4EC3 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; 37 | 6830363913620479000E4EC3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | 68303664136205DF000E4EC3 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 39 | 68303665136205DF000E4EC3 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 40 | 6830366E136205EB000E4EC3 /* MainWindow_iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow_iPad.xib; sourceTree = ""; }; 41 | 6830366F136205EB000E4EC3 /* MainWindow_iPhone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow_iPhone.xib; sourceTree = ""; }; 42 | 683036731362061B000E4EC3 /* astroland.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = astroland.jpg; sourceTree = ""; }; 43 | 6830367D13620672000E4EC3 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; 44 | 6830367E13620672000E4EC3 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; 45 | 6830368013620700000E4EC3 /* RootView~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "RootView~ipad.xib"; sourceTree = ""; }; 46 | 683036821362092B000E4EC3 /* RootView~iphone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "RootView~iphone.xib"; sourceTree = ""; }; 47 | 686D53871365B04200FFF635 /* subway.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = subway.jpg; sourceTree = ""; }; 48 | 686D53881365B04200FFF635 /* tower.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = tower.jpg; sourceTree = ""; }; 49 | 6876364513621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KTOneFingerRotationGestureRecognizer.h; sourceTree = SOURCE_ROOT; }; 50 | 6876364613621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KTOneFingerRotationGestureRecognizer.m; sourceTree = SOURCE_ROOT; }; 51 | 687636481362209100B19700 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 52 | 687636491362209200B19700 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 6830362513620479000E4EC3 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 6830362D13620479000E4EC3 /* UIKit.framework in Frameworks */, 61 | 6830362F13620479000E4EC3 /* Foundation.framework in Frameworks */, 62 | 6830363113620479000E4EC3 /* CoreGraphics.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 6830361D13620479000E4EC3 = { 70 | isa = PBXGroup; 71 | children = ( 72 | 687636481362209100B19700 /* LICENSE */, 73 | 687636491362209200B19700 /* README.md */, 74 | 6830363213620479000E4EC3 /* OneFingerRotation */, 75 | 6830362B13620479000E4EC3 /* Frameworks */, 76 | 6830362913620479000E4EC3 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 6830362913620479000E4EC3 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 6830362813620479000E4EC3 /* OneFingerRotation.app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 6830362B13620479000E4EC3 /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 6830362C13620479000E4EC3 /* UIKit.framework */, 92 | 6830362E13620479000E4EC3 /* Foundation.framework */, 93 | 6830363013620479000E4EC3 /* CoreGraphics.framework */, 94 | ); 95 | name = Frameworks; 96 | sourceTree = ""; 97 | }; 98 | 6830363213620479000E4EC3 /* OneFingerRotation */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 68303663136205DF000E4EC3 /* Classes */, 102 | 6830363313620479000E4EC3 /* Supporting Files */, 103 | 683036721362061B000E4EC3 /* images */, 104 | 6830366D136205EB000E4EC3 /* xibs */, 105 | ); 106 | path = OneFingerRotation; 107 | sourceTree = ""; 108 | }; 109 | 6830363313620479000E4EC3 /* Supporting Files */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 6830363413620479000E4EC3 /* Info.plist */, 113 | 6830363513620479000E4EC3 /* InfoPlist.strings */, 114 | 6830363813620479000E4EC3 /* Prefix.pch */, 115 | 6830363913620479000E4EC3 /* main.m */, 116 | ); 117 | name = "Supporting Files"; 118 | sourceTree = ""; 119 | }; 120 | 68303663136205DF000E4EC3 /* Classes */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 68303664136205DF000E4EC3 /* AppDelegate.h */, 124 | 68303665136205DF000E4EC3 /* AppDelegate.m */, 125 | 6830367D13620672000E4EC3 /* RootViewController.h */, 126 | 6830367E13620672000E4EC3 /* RootViewController.m */, 127 | 6876364513621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.h */, 128 | 6876364613621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.m */, 129 | ); 130 | path = Classes; 131 | sourceTree = ""; 132 | }; 133 | 6830366D136205EB000E4EC3 /* xibs */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 6830366E136205EB000E4EC3 /* MainWindow_iPad.xib */, 137 | 6830366F136205EB000E4EC3 /* MainWindow_iPhone.xib */, 138 | 6830368013620700000E4EC3 /* RootView~ipad.xib */, 139 | 683036821362092B000E4EC3 /* RootView~iphone.xib */, 140 | ); 141 | path = xibs; 142 | sourceTree = ""; 143 | }; 144 | 683036721362061B000E4EC3 /* images */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 683036731362061B000E4EC3 /* astroland.jpg */, 148 | 686D53871365B04200FFF635 /* subway.jpg */, 149 | 686D53881365B04200FFF635 /* tower.jpg */, 150 | ); 151 | path = images; 152 | sourceTree = ""; 153 | }; 154 | /* End PBXGroup section */ 155 | 156 | /* Begin PBXNativeTarget section */ 157 | 6830362713620479000E4EC3 /* OneFingerRotation */ = { 158 | isa = PBXNativeTarget; 159 | buildConfigurationList = 6830364E13620479000E4EC3 /* Build configuration list for PBXNativeTarget "OneFingerRotation" */; 160 | buildPhases = ( 161 | 6830362413620479000E4EC3 /* Sources */, 162 | 6830362513620479000E4EC3 /* Frameworks */, 163 | 6830362613620479000E4EC3 /* Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | ); 169 | name = OneFingerRotation; 170 | productName = OneFingerRotation; 171 | productReference = 6830362813620479000E4EC3 /* OneFingerRotation.app */; 172 | productType = "com.apple.product-type.application"; 173 | }; 174 | /* End PBXNativeTarget section */ 175 | 176 | /* Begin PBXProject section */ 177 | 6830361F13620479000E4EC3 /* Project object */ = { 178 | isa = PBXProject; 179 | attributes = { 180 | ORGANIZATIONNAME = "White Peak Software Inc."; 181 | }; 182 | buildConfigurationList = 6830362213620479000E4EC3 /* Build configuration list for PBXProject "OneFingerRotation" */; 183 | compatibilityVersion = "Xcode 3.2"; 184 | developmentRegion = English; 185 | hasScannedForEncodings = 0; 186 | knownRegions = ( 187 | en, 188 | ); 189 | mainGroup = 6830361D13620479000E4EC3; 190 | productRefGroup = 6830362913620479000E4EC3 /* Products */; 191 | projectDirPath = ""; 192 | projectRoot = ""; 193 | targets = ( 194 | 6830362713620479000E4EC3 /* OneFingerRotation */, 195 | ); 196 | }; 197 | /* End PBXProject section */ 198 | 199 | /* Begin PBXResourcesBuildPhase section */ 200 | 6830362613620479000E4EC3 /* Resources */ = { 201 | isa = PBXResourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | 6830363713620479000E4EC3 /* InfoPlist.strings in Resources */, 205 | 68303670136205EB000E4EC3 /* MainWindow_iPad.xib in Resources */, 206 | 68303671136205EB000E4EC3 /* MainWindow_iPhone.xib in Resources */, 207 | 683036741362061B000E4EC3 /* astroland.jpg in Resources */, 208 | 6830368113620701000E4EC3 /* RootView~ipad.xib in Resources */, 209 | 683036831362092B000E4EC3 /* RootView~iphone.xib in Resources */, 210 | 6876364A1362209200B19700 /* LICENSE in Resources */, 211 | 6876364B1362209200B19700 /* README.md in Resources */, 212 | 686D53891365B04200FFF635 /* subway.jpg in Resources */, 213 | 686D538A1365B04200FFF635 /* tower.jpg in Resources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | 6830362413620479000E4EC3 /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 6830363A13620479000E4EC3 /* main.m in Sources */, 225 | 6830366A136205DF000E4EC3 /* AppDelegate.m in Sources */, 226 | 6830367F13620672000E4EC3 /* RootViewController.m in Sources */, 227 | 6876364713621C9E00B19700 /* KTOneFingerRotationGestureRecognizer.m in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXSourcesBuildPhase section */ 232 | 233 | /* Begin PBXVariantGroup section */ 234 | 6830363513620479000E4EC3 /* InfoPlist.strings */ = { 235 | isa = PBXVariantGroup; 236 | children = ( 237 | 6830363613620479000E4EC3 /* en */, 238 | ); 239 | name = InfoPlist.strings; 240 | sourceTree = ""; 241 | }; 242 | /* End PBXVariantGroup section */ 243 | 244 | /* Begin XCBuildConfiguration section */ 245 | 6830364C13620479000E4EC3 /* Debug */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 249 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_OPTIMIZATION_LEVEL = 0; 252 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 253 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 254 | GCC_VERSION = com.apple.compilers.llvmgcc42; 255 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 256 | GCC_WARN_UNUSED_VARIABLE = YES; 257 | IPHONEOS_DEPLOYMENT_TARGET = 4.2; 258 | SDKROOT = iphoneos; 259 | TARGETED_DEVICE_FAMILY = "1,2"; 260 | }; 261 | name = Debug; 262 | }; 263 | 6830364D13620479000E4EC3 /* Release */ = { 264 | isa = XCBuildConfiguration; 265 | buildSettings = { 266 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 267 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 268 | GCC_C_LANGUAGE_STANDARD = gnu99; 269 | GCC_VERSION = com.apple.compilers.llvmgcc42; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | IPHONEOS_DEPLOYMENT_TARGET = 4.2; 273 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 274 | SDKROOT = iphoneos; 275 | TARGETED_DEVICE_FAMILY = "1,2"; 276 | }; 277 | name = Release; 278 | }; 279 | 6830364F13620479000E4EC3 /* Debug */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | COPY_PHASE_STRIP = NO; 284 | GCC_DYNAMIC_NO_PIC = NO; 285 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 286 | GCC_PREFIX_HEADER = OneFingerRotation/Prefix.pch; 287 | INFOPLIST_FILE = OneFingerRotation/Info.plist; 288 | PRODUCT_NAME = "$(TARGET_NAME)"; 289 | WRAPPER_EXTENSION = app; 290 | }; 291 | name = Debug; 292 | }; 293 | 6830365013620479000E4EC3 /* Release */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ALWAYS_SEARCH_USER_PATHS = NO; 297 | COPY_PHASE_STRIP = YES; 298 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 299 | GCC_PREFIX_HEADER = OneFingerRotation/Prefix.pch; 300 | INFOPLIST_FILE = OneFingerRotation/Info.plist; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | VALIDATE_PRODUCT = YES; 303 | WRAPPER_EXTENSION = app; 304 | }; 305 | name = Release; 306 | }; 307 | /* End XCBuildConfiguration section */ 308 | 309 | /* Begin XCConfigurationList section */ 310 | 6830362213620479000E4EC3 /* Build configuration list for PBXProject "OneFingerRotation" */ = { 311 | isa = XCConfigurationList; 312 | buildConfigurations = ( 313 | 6830364C13620479000E4EC3 /* Debug */, 314 | 6830364D13620479000E4EC3 /* Release */, 315 | ); 316 | defaultConfigurationIsVisible = 0; 317 | defaultConfigurationName = Release; 318 | }; 319 | 6830364E13620479000E4EC3 /* Build configuration list for PBXNativeTarget "OneFingerRotation" */ = { 320 | isa = XCConfigurationList; 321 | buildConfigurations = ( 322 | 6830364F13620479000E4EC3 /* Debug */, 323 | 6830365013620479000E4EC3 /* Release */, 324 | ); 325 | defaultConfigurationIsVisible = 0; 326 | defaultConfigurationName = Release; 327 | }; 328 | /* End XCConfigurationList section */ 329 | }; 330 | rootObject = 6830361F13620479000E4EC3 /* Project object */; 331 | } 332 | -------------------------------------------------------------------------------- /OneFingerRotation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OneFingerRotation/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OneFingerRotationAppDelegate.h 3 | // OneFingerRotation 4 | // 5 | // Created by Kirby Turner on 4/22/11. 6 | // Copyright 2011 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject { 12 | 13 | } 14 | 15 | @property (nonatomic, retain) IBOutlet UIWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /OneFingerRotation/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // OneFingerRotationAppDelegate.m 3 | // OneFingerRotation 4 | // 5 | // Created by Kirby Turner on 4/22/11. 6 | // Copyright 2011 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RootViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | 15 | @synthesize window=_window; 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | // Override point for customization after application launch. 20 | RootViewController *newController = [[RootViewController alloc] init]; 21 | [[self window] setRootViewController:newController]; 22 | [newController release]; 23 | 24 | [[self window] makeKeyAndVisible]; 25 | return YES; 26 | } 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application 29 | { 30 | /* 31 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 32 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 33 | */ 34 | } 35 | 36 | - (void)applicationDidEnterBackground:(UIApplication *)application 37 | { 38 | /* 39 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 40 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 41 | */ 42 | } 43 | 44 | - (void)applicationWillEnterForeground:(UIApplication *)application 45 | { 46 | /* 47 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 48 | */ 49 | } 50 | 51 | - (void)applicationDidBecomeActive:(UIApplication *)application 52 | { 53 | /* 54 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 55 | */ 56 | } 57 | 58 | - (void)applicationWillTerminate:(UIApplication *)application 59 | { 60 | /* 61 | Called when the application is about to terminate. 62 | Save data if appropriate. 63 | See also applicationDidEnterBackground:. 64 | */ 65 | } 66 | 67 | - (void)dealloc 68 | { 69 | [_window release]; 70 | [super dealloc]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /OneFingerRotation/Classes/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // OneFingerRotation 4 | // 5 | // Created by Kirby Turner on 4/22/11. 6 | // Copyright 2011 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RootViewController : UIViewController 13 | { 14 | 15 | } 16 | 17 | @property (nonatomic, retain) IBOutlet UIImageView *imageView1; 18 | @property (nonatomic, retain) IBOutlet UIImageView *imageView2; 19 | @property (nonatomic, retain) IBOutlet UIImageView *imageView3; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /OneFingerRotation/Classes/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // OneFingerRotation 4 | // 5 | // Created by Kirby Turner on 4/22/11. 6 | // Copyright 2011 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | #import "KTOneFingerRotationGestureRecognizer.h" 11 | 12 | 13 | @implementation RootViewController 14 | 15 | @synthesize imageView1 = imageView1_; 16 | @synthesize imageView2 = imageView2_; 17 | @synthesize imageView3 = imageView3_; 18 | 19 | - (void)dealloc 20 | { 21 | 22 | [imageView1_ release], imageView1_ = nil; 23 | [imageView2_ release], imageView2_ = nil; 24 | [imageView3_ release], imageView3_ = nil; 25 | [super dealloc]; 26 | } 27 | 28 | - (id)init 29 | { 30 | self = [super initWithNibName:@"RootView" bundle:nil]; 31 | if (self) { 32 | 33 | } 34 | return self; 35 | } 36 | 37 | - (void)addRotationGestureToView:(UIView *)view 38 | { 39 | KTOneFingerRotationGestureRecognizer *rotation = [[KTOneFingerRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotating:)]; 40 | [view addGestureRecognizer:rotation]; 41 | [rotation release]; 42 | } 43 | 44 | - (void)addTapGestureToView:(UIView *)view numberOfTaps:(NSInteger)numberOfTaps 45 | { 46 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)]; 47 | [tap setNumberOfTapsRequired:numberOfTaps]; 48 | [view addGestureRecognizer:tap]; 49 | [tap release]; 50 | } 51 | 52 | - (void)viewDidLoad 53 | { 54 | [super viewDidLoad]; 55 | 56 | // UIImageView sets userInteractionEnabled to NO by default. 57 | [[self imageView1] setUserInteractionEnabled:YES]; 58 | [[self imageView2] setUserInteractionEnabled:YES]; 59 | [[self imageView3] setUserInteractionEnabled:YES]; 60 | 61 | [self addRotationGestureToView:[self view]]; 62 | [self addTapGestureToView:[self view] numberOfTaps:1]; 63 | 64 | [self addRotationGestureToView:[self imageView1]]; 65 | [self addTapGestureToView:[self imageView1] numberOfTaps:1]; 66 | 67 | [self addRotationGestureToView:[self imageView2]]; 68 | [self addTapGestureToView:[self imageView2] numberOfTaps:2]; 69 | 70 | [self addRotationGestureToView:[self imageView3]]; 71 | [self addTapGestureToView:[self imageView3] numberOfTaps:3]; 72 | } 73 | 74 | - (void)viewDidUnload 75 | { 76 | [self setImageView1:nil]; 77 | [self setImageView2:nil]; 78 | [self setImageView3:nil]; 79 | [super viewDidUnload]; 80 | } 81 | 82 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 83 | { 84 | return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); 85 | } 86 | 87 | - (void)rotating:(KTOneFingerRotationGestureRecognizer *)recognizer 88 | { 89 | UIView *view = [recognizer view]; 90 | [view setTransform:CGAffineTransformRotate([view transform], [recognizer rotation])]; 91 | } 92 | 93 | - (void)tapped:(UITapGestureRecognizer *)recognizer 94 | { 95 | UIView *view = [recognizer view]; 96 | [view setTransform:CGAffineTransformMakeRotation(0)]; 97 | } 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /OneFingerRotation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.whitepeaksoftware.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow_iPhone 31 | NSMainNibFile~ipad 32 | MainWindow_iPad 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /OneFingerRotation/Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OneFingerRotation' target in the 'OneFingerRotation' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /OneFingerRotation/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /OneFingerRotation/images/astroland.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/OneFingerRotation/images/astroland.jpg -------------------------------------------------------------------------------- /OneFingerRotation/images/subway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/OneFingerRotation/images/subway.jpg -------------------------------------------------------------------------------- /OneFingerRotation/images/tower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirbyt/KTOneFingerRotationGestureRecognizer/a2013cd7dd36a07bff8084ccc0efb1ee0314fa27/OneFingerRotation/images/tower.jpg -------------------------------------------------------------------------------- /OneFingerRotation/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OneFingerRotation 4 | // 5 | // Created by Kirby Turner on 4/22/11. 6 | // Copyright 2011 White Peak Software Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /OneFingerRotation/xibs/MainWindow_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10J567 6 | 1305 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 300 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIWindow 17 | IBUICustomObject 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | YES 25 | 26 | YES 27 | 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBIPadFramework 35 | 36 | 37 | IBFirstResponder 38 | IBIPadFramework 39 | 40 | 41 | 42 | 292 43 | {768, 1024} 44 | 45 | 46 | 47 | 48 | 1 49 | MSAxIDEAA 50 | 51 | NO 52 | NO 53 | 54 | 2 55 | 56 | IBIPadFramework 57 | YES 58 | 59 | 60 | IBIPadFramework 61 | 62 | 63 | 64 | 65 | YES 66 | 67 | 68 | window 69 | 70 | 71 | 72 | 7 73 | 74 | 75 | 76 | delegate 77 | 78 | 79 | 80 | 8 81 | 82 | 83 | 84 | 85 | YES 86 | 87 | 0 88 | 89 | 90 | 91 | 92 | 93 | -1 94 | 95 | 96 | File's Owner 97 | 98 | 99 | -2 100 | 101 | 102 | 103 | 104 | 2 105 | 106 | 107 | YES 108 | 109 | 110 | 111 | 112 | 6 113 | 114 | 115 | 116 | 117 | 118 | 119 | YES 120 | 121 | YES 122 | -1.CustomClassName 123 | -2.CustomClassName 124 | 2.IBEditorWindowLastContentRect 125 | 2.IBPluginDependency 126 | 6.CustomClassName 127 | 6.IBPluginDependency 128 | 129 | 130 | YES 131 | UIApplication 132 | UIResponder 133 | {{202, 84}, {783, 772}} 134 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 135 | AppDelegate 136 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 137 | 138 | 139 | 140 | YES 141 | 142 | 143 | 144 | 145 | 146 | YES 147 | 148 | 149 | 150 | 151 | 11 152 | 153 | 154 | 155 | YES 156 | 157 | AppDelegate 158 | NSObject 159 | 160 | window 161 | UIWindow 162 | 163 | 164 | window 165 | 166 | window 167 | UIWindow 168 | 169 | 170 | 171 | IBProjectSource 172 | ./Classes/AppDelegate.h 173 | 174 | 175 | 176 | 177 | 0 178 | IBIPadFramework 179 | 180 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 181 | 182 | 183 | 184 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 185 | 186 | 187 | YES 188 | 3 189 | 300 190 | 191 | 192 | -------------------------------------------------------------------------------- /OneFingerRotation/xibs/MainWindow_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10J567 6 | 1305 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 300 12 | 13 | 14 | YES 15 | IBUIWindow 16 | IBProxyObject 17 | IBUICustomObject 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | YES 25 | 26 | YES 27 | 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | 45 | 1316 46 | 47 | {320, 480} 48 | 49 | 50 | 51 | 52 | 1 53 | MSAxIDEAA 54 | 55 | NO 56 | NO 57 | 58 | IBCocoaTouchFramework 59 | YES 60 | 61 | 62 | 63 | 64 | YES 65 | 66 | 67 | delegate 68 | 69 | 70 | 71 | 5 72 | 73 | 74 | 75 | window 76 | 77 | 78 | 79 | 6 80 | 81 | 82 | 83 | 84 | YES 85 | 86 | 0 87 | 88 | 89 | 90 | 91 | 92 | 2 93 | 94 | 95 | YES 96 | 97 | 98 | 99 | 100 | -1 101 | 102 | 103 | File's Owner 104 | 105 | 106 | 4 107 | 108 | 109 | App Delegate 110 | 111 | 112 | -2 113 | 114 | 115 | 116 | 117 | 118 | 119 | YES 120 | 121 | YES 122 | -1.CustomClassName 123 | -2.CustomClassName 124 | 2.IBAttributePlaceholdersKey 125 | 2.IBEditorWindowLastContentRect 126 | 2.IBPluginDependency 127 | 2.UIWindow.visibleAtLaunch 128 | 4.CustomClassName 129 | 4.IBPluginDependency 130 | 131 | 132 | YES 133 | UIApplication 134 | UIResponder 135 | 136 | YES 137 | 138 | 139 | 140 | {{520, 376}, {320, 480}} 141 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 142 | 143 | AppDelegate 144 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 145 | 146 | 147 | 148 | YES 149 | 150 | 151 | 152 | 153 | 154 | YES 155 | 156 | 157 | 158 | 159 | 8 160 | 161 | 162 | 163 | YES 164 | 165 | AppDelegate 166 | NSObject 167 | 168 | window 169 | UIWindow 170 | 171 | 172 | window 173 | 174 | window 175 | UIWindow 176 | 177 | 178 | 179 | IBProjectSource 180 | ./Classes/AppDelegate.h 181 | 182 | 183 | 184 | 185 | 0 186 | IBCocoaTouchFramework 187 | 188 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 189 | 190 | 191 | 192 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 193 | 194 | 195 | YES 196 | 3 197 | 300 198 | 199 | 200 | -------------------------------------------------------------------------------- /OneFingerRotation/xibs/RootView~ipad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J567 6 | 1305 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 300 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIView 17 | IBUIImageView 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | YES 25 | 26 | YES 27 | 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBIPadFramework 35 | 36 | 37 | IBFirstResponder 38 | IBIPadFramework 39 | 40 | 41 | 42 | 274 43 | 44 | YES 45 | 46 | 47 | 301 48 | {{64, 262}, {640, 480}} 49 | 50 | 51 | 52 | NO 53 | IBIPadFramework 54 | 55 | NSImage 56 | astroland.jpg 57 | 58 | 59 | 60 | 61 | 292 62 | {{108, 14}, {320, 240}} 63 | 64 | 65 | 66 | NO 67 | IBIPadFramework 68 | 69 | NSImage 70 | subway.jpg 71 | 72 | 73 | 74 | 75 | 292 76 | {{465, 806}, {160, 120}} 77 | 78 | 79 | 80 | NO 81 | IBIPadFramework 82 | 83 | NSImage 84 | tower.jpg 85 | 86 | 87 | 88 | {{0, 20}, {768, 1004}} 89 | 90 | 91 | 92 | 93 | 1 94 | MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA 95 | 96 | 97 | 2 98 | 99 | IBIPadFramework 100 | 101 | 102 | 103 | 104 | YES 105 | 106 | 107 | view 108 | 109 | 110 | 111 | 4 112 | 113 | 114 | 115 | imageView1 116 | 117 | 118 | 119 | 9 120 | 121 | 122 | 123 | imageView2 124 | 125 | 126 | 127 | 10 128 | 129 | 130 | 131 | imageView3 132 | 133 | 134 | 135 | 11 136 | 137 | 138 | 139 | 140 | YES 141 | 142 | 0 143 | 144 | 145 | 146 | 147 | 148 | 1 149 | 150 | 151 | YES 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | -1 160 | 161 | 162 | File's Owner 163 | 164 | 165 | -2 166 | 167 | 168 | 169 | 170 | 5 171 | 172 | 173 | 174 | 175 | 7 176 | 177 | 178 | 179 | 180 | 8 181 | 182 | 183 | 184 | 185 | 186 | 187 | YES 188 | 189 | YES 190 | -1.CustomClassName 191 | -2.CustomClassName 192 | 1.IBEditorWindowLastContentRect 193 | 1.IBPluginDependency 194 | 5.IBPluginDependency 195 | 7.IBPluginDependency 196 | 8.IBPluginDependency 197 | 198 | 199 | YES 200 | RootViewController 201 | UIResponder 202 | {{514, 109}, {768, 1024}} 203 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 204 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 205 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 206 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 207 | 208 | 209 | 210 | YES 211 | 212 | 213 | 214 | 215 | 216 | YES 217 | 218 | 219 | 220 | 221 | 11 222 | 223 | 224 | 225 | YES 226 | 227 | RootViewController 228 | UIViewController 229 | 230 | YES 231 | 232 | YES 233 | imageView1 234 | imageView2 235 | imageView3 236 | 237 | 238 | YES 239 | UIImageView 240 | UIImageView 241 | UIImageView 242 | 243 | 244 | 245 | YES 246 | 247 | YES 248 | imageView1 249 | imageView2 250 | imageView3 251 | 252 | 253 | YES 254 | 255 | imageView1 256 | UIImageView 257 | 258 | 259 | imageView2 260 | UIImageView 261 | 262 | 263 | imageView3 264 | UIImageView 265 | 266 | 267 | 268 | 269 | IBProjectSource 270 | ./Classes/RootViewController.h 271 | 272 | 273 | 274 | 275 | 0 276 | IBIPadFramework 277 | 278 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 279 | 280 | 281 | YES 282 | 3 283 | 284 | YES 285 | 286 | YES 287 | astroland.jpg 288 | subway.jpg 289 | tower.jpg 290 | 291 | 292 | YES 293 | {640, 480} 294 | {640, 480} 295 | {640, 480} 296 | 297 | 298 | 300 299 | 300 | 301 | -------------------------------------------------------------------------------- /OneFingerRotation/xibs/RootView~iphone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J567 6 | 1305 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 300 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIView 17 | IBUIImageView 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | YES 25 | 26 | YES 27 | 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | 44 | YES 45 | 46 | 47 | 274 48 | {{80, 170}, {160, 120}} 49 | 50 | 51 | NO 52 | IBCocoaTouchFramework 53 | 54 | NSImage 55 | astroland.jpg 56 | 57 | 58 | 59 | 60 | 274 61 | {{20, 20}, {160, 120}} 62 | 63 | 64 | NO 65 | IBCocoaTouchFramework 66 | 67 | NSImage 68 | subway.jpg 69 | 70 | 71 | 72 | 73 | 274 74 | {{140, 320}, {160, 120}} 75 | 76 | 77 | NO 78 | IBCocoaTouchFramework 79 | 80 | NSImage 81 | tower.jpg 82 | 83 | 84 | 85 | {{0, 20}, {320, 460}} 86 | 87 | 88 | 89 | 90 | 1 91 | MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA 92 | 93 | 94 | IBCocoaTouchFramework 95 | 96 | 97 | 98 | 99 | YES 100 | 101 | 102 | view 103 | 104 | 105 | 106 | 4 107 | 108 | 109 | 110 | imageView1 111 | 112 | 113 | 114 | 9 115 | 116 | 117 | 118 | imageView2 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | imageView3 127 | 128 | 129 | 130 | 11 131 | 132 | 133 | 134 | 135 | YES 136 | 137 | 0 138 | 139 | 140 | 141 | 142 | 143 | 1 144 | 145 | 146 | YES 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -1 155 | 156 | 157 | File's Owner 158 | 159 | 160 | -2 161 | 162 | 163 | 164 | 165 | 5 166 | 167 | 168 | 169 | 170 | 7 171 | 172 | 173 | 174 | 175 | 8 176 | 177 | 178 | 179 | 180 | 181 | 182 | YES 183 | 184 | YES 185 | -1.CustomClassName 186 | -2.CustomClassName 187 | 1.IBEditorWindowLastContentRect 188 | 1.IBPluginDependency 189 | 5.IBPluginDependency 190 | 7.IBPluginDependency 191 | 8.IBPluginDependency 192 | 193 | 194 | YES 195 | RootViewController 196 | UIResponder 197 | {{354, 412}, {320, 480}} 198 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 199 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 200 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 201 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 202 | 203 | 204 | 205 | YES 206 | 207 | 208 | 209 | 210 | 211 | YES 212 | 213 | 214 | 215 | 216 | 11 217 | 218 | 219 | 220 | YES 221 | 222 | RootViewController 223 | UIViewController 224 | 225 | YES 226 | 227 | YES 228 | imageView1 229 | imageView2 230 | imageView3 231 | 232 | 233 | YES 234 | UIImageView 235 | UIImageView 236 | UIImageView 237 | 238 | 239 | 240 | YES 241 | 242 | YES 243 | imageView1 244 | imageView2 245 | imageView3 246 | 247 | 248 | YES 249 | 250 | imageView1 251 | UIImageView 252 | 253 | 254 | imageView2 255 | UIImageView 256 | 257 | 258 | imageView3 259 | UIImageView 260 | 261 | 262 | 263 | 264 | IBProjectSource 265 | ./Classes/RootViewController.h 266 | 267 | 268 | 269 | 270 | 0 271 | IBCocoaTouchFramework 272 | 273 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 274 | 275 | 276 | YES 277 | 3 278 | 279 | YES 280 | 281 | YES 282 | astroland.jpg 283 | subway.jpg 284 | tower.jpg 285 | 286 | 287 | YES 288 | {640, 480} 289 | {640, 480} 290 | {640, 480} 291 | 292 | 293 | 300 294 | 295 | 296 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | KTOneFingerRotationGestureRecognizer 2 | ==================================== 3 | 4 | KTOneFingerRotationGestureRecognizer is a custom UIGestureRecognizer for doing one finger rotations in iOS apps. It tracks finger movement around a central point. 5 | 6 | 7 | License 8 | ======= 9 | 10 | The MIT License 11 | 12 | Copyright (c) 2011 White Peak Software Inc 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. --------------------------------------------------------------------------------