├── Examples ├── Controls Example │ ├── SwipeViewExample.xcodeproj │ │ └── project.pbxproj │ └── SwipeViewExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Default-568h@2x.png │ │ ├── ItemView.xib │ │ ├── SwipeViewExample-Info.plist │ │ ├── SwipeViewExample-Prefix.pch │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── ViewController.xib │ │ └── main.m └── Paging Example │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── ExampleViewController.h │ ├── ExampleViewController.m │ ├── SwipeViewExample-Info.plist │ ├── SwipeViewExample-Prefix.pch │ ├── SwipeViewExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── SwipeViewExample.xcscheme │ ├── en.lproj │ ├── ExampleViewController.xib │ ├── InfoPlist.strings │ └── MainWindow.xib │ └── main.m ├── LICENCE.md ├── README.md ├── SwipeView.podspec ├── SwipeView ├── SwipeView.h └── SwipeView.m └── Tests ├── Content Offsets ├── SwipeViewExample.xcodeproj │ └── project.pbxproj └── SwipeViewExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── SwipeViewExample-Info.plist │ ├── SwipeViewExample-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── ViewController.xib │ └── main.m ├── Reload Test ├── SwipeViewExample.xcodeproj │ └── project.pbxproj └── SwipeViewExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── SwipeViewExample-Info.plist │ ├── SwipeViewExample-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ └── ViewController.xib │ └── main.m └── Scroll Test ├── SwipeViewExample.xcodeproj └── project.pbxproj └── SwipeViewExample ├── AppDelegate.h ├── AppDelegate.m ├── Default-568h@2x.png ├── SwipeViewExample-Info.plist ├── SwipeViewExample-Prefix.pch ├── ViewController.h ├── ViewController.m ├── en.lproj ├── InfoPlist.strings └── ViewController.xib └── main.m /Examples/Controls Example/SwipeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 019466DB15B3129800B9CA30 /* SwipeView.m */; }; 11 | 0196B56C15F3E0C700BDDC55 /* ItemView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0196B56B15F3E0C700BDDC55 /* ItemView.xib */; }; 12 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D25145B5FCC00D118DB /* UIKit.framework */; }; 13 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D27145B5FCC00D118DB /* Foundation.framework */; }; 14 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */; }; 15 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */; }; 16 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D31145B5FCC00D118DB /* main.m */; }; 17 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D35145B5FCC00D118DB /* AppDelegate.m */; }; 18 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D38145B5FCC00D118DB /* ViewController.m */; }; 19 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D3A145B5FCC00D118DB /* ViewController.xib */; }; 20 | 01FACD21166114C800B8C1A0 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 01FACD20166114C800B8C1A0 /* Default-568h@2x.png */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 019466DA15B3129800B9CA30 /* SwipeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwipeView.h; sourceTree = ""; }; 25 | 019466DB15B3129800B9CA30 /* SwipeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwipeView.m; sourceTree = ""; }; 26 | 0196B56B15F3E0C700BDDC55 /* ItemView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ItemView.xib; sourceTree = ""; }; 27 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwipeViewExample-Info.plist"; sourceTree = ""; }; 32 | 01FA7D2F145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 01FA7D31145B5FCC00D118DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwipeViewExample-Prefix.pch"; sourceTree = ""; }; 35 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | 01FA7D37145B5FCC00D118DB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 38 | 01FA7D38145B5FCC00D118DB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 39 | 01FA7D3B145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 40 | 01FACD20166114C800B8C1A0 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 01FA7D1E145B5FCC00D118DB /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */, 49 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */, 50 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | 019466D915B3129800B9CA30 /* SwipeView */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 019466DA15B3129800B9CA30 /* SwipeView.h */, 61 | 019466DB15B3129800B9CA30 /* SwipeView.m */, 62 | ); 63 | name = SwipeView; 64 | path = ../../SwipeView; 65 | sourceTree = ""; 66 | }; 67 | 01FA7D16145B5FCB00D118DB = { 68 | isa = PBXGroup; 69 | children = ( 70 | 019466D915B3129800B9CA30 /* SwipeView */, 71 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */, 72 | 01FA7D24145B5FCC00D118DB /* Frameworks */, 73 | 01FA7D22145B5FCC00D118DB /* Products */, 74 | ); 75 | sourceTree = ""; 76 | }; 77 | 01FA7D22145B5FCC00D118DB /* Products */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | 01FA7D24145B5FCC00D118DB /* Frameworks */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */, 89 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */, 90 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */, 91 | ); 92 | name = Frameworks; 93 | sourceTree = ""; 94 | }; 95 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */, 99 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */, 100 | 01FA7D37145B5FCC00D118DB /* ViewController.h */, 101 | 01FA7D38145B5FCC00D118DB /* ViewController.m */, 102 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */, 103 | 0196B56B15F3E0C700BDDC55 /* ItemView.xib */, 104 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */, 105 | ); 106 | path = SwipeViewExample; 107 | sourceTree = ""; 108 | }; 109 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 01FACD20166114C800B8C1A0 /* Default-568h@2x.png */, 113 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */, 114 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */, 115 | 01FA7D31145B5FCC00D118DB /* main.m */, 116 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */; 127 | buildPhases = ( 128 | 01FA7D1D145B5FCC00D118DB /* Sources */, 129 | 01FA7D1E145B5FCC00D118DB /* Frameworks */, 130 | 01FA7D1F145B5FCC00D118DB /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | ); 136 | name = SwipeViewExample; 137 | productName = SwipeViewExample; 138 | productReference = 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */; 139 | productType = "com.apple.product-type.application"; 140 | }; 141 | /* End PBXNativeTarget section */ 142 | 143 | /* Begin PBXProject section */ 144 | 01FA7D18145B5FCB00D118DB /* Project object */ = { 145 | isa = PBXProject; 146 | attributes = { 147 | LastUpgradeCheck = 0460; 148 | }; 149 | buildConfigurationList = 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */; 150 | compatibilityVersion = "Xcode 3.2"; 151 | developmentRegion = English; 152 | hasScannedForEncodings = 0; 153 | knownRegions = ( 154 | en, 155 | ); 156 | mainGroup = 01FA7D16145B5FCB00D118DB; 157 | productRefGroup = 01FA7D22145B5FCC00D118DB /* Products */; 158 | projectDirPath = ""; 159 | projectRoot = ""; 160 | targets = ( 161 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */, 162 | ); 163 | }; 164 | /* End PBXProject section */ 165 | 166 | /* Begin PBXResourcesBuildPhase section */ 167 | 01FA7D1F145B5FCC00D118DB /* Resources */ = { 168 | isa = PBXResourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */, 172 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */, 173 | 0196B56C15F3E0C700BDDC55 /* ItemView.xib in Resources */, 174 | 01FACD21166114C800B8C1A0 /* Default-568h@2x.png in Resources */, 175 | ); 176 | runOnlyForDeploymentPostprocessing = 0; 177 | }; 178 | /* End PBXResourcesBuildPhase section */ 179 | 180 | /* Begin PBXSourcesBuildPhase section */ 181 | 01FA7D1D145B5FCC00D118DB /* Sources */ = { 182 | isa = PBXSourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */, 186 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */, 187 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */, 188 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXSourcesBuildPhase section */ 193 | 194 | /* Begin PBXVariantGroup section */ 195 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */ = { 196 | isa = PBXVariantGroup; 197 | children = ( 198 | 01FA7D2F145B5FCC00D118DB /* en */, 199 | ); 200 | name = InfoPlist.strings; 201 | sourceTree = ""; 202 | }; 203 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */ = { 204 | isa = PBXVariantGroup; 205 | children = ( 206 | 01FA7D3B145B5FCC00D118DB /* en */, 207 | ); 208 | name = ViewController.xib; 209 | sourceTree = ""; 210 | }; 211 | /* End PBXVariantGroup section */ 212 | 213 | /* Begin XCBuildConfiguration section */ 214 | 01FA7D3D145B5FCC00D118DB /* Debug */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 219 | CLANG_WARN_CONSTANT_CONVERSION = YES; 220 | CLANG_WARN_ENUM_CONVERSION = YES; 221 | CLANG_WARN_INT_CONVERSION = YES; 222 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 223 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 224 | COPY_PHASE_STRIP = NO; 225 | GCC_C_LANGUAGE_STANDARD = gnu99; 226 | GCC_DYNAMIC_NO_PIC = NO; 227 | GCC_OPTIMIZATION_LEVEL = 0; 228 | GCC_PREPROCESSOR_DEFINITIONS = ( 229 | "DEBUG=1", 230 | "$(inherited)", 231 | ); 232 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 233 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 234 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 235 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 237 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 238 | GCC_WARN_UNUSED_VARIABLE = YES; 239 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 240 | RUN_CLANG_STATIC_ANALYZER = YES; 241 | SDKROOT = iphoneos; 242 | }; 243 | name = Debug; 244 | }; 245 | 01FA7D3E145B5FCC00D118DB /* Release */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ALWAYS_SEARCH_USER_PATHS = NO; 249 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_ENUM_CONVERSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 254 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 255 | COPY_PHASE_STRIP = YES; 256 | GCC_C_LANGUAGE_STANDARD = gnu99; 257 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 258 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 259 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 261 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 262 | GCC_WARN_UNUSED_VARIABLE = YES; 263 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 264 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 265 | RUN_CLANG_STATIC_ANALYZER = YES; 266 | SDKROOT = iphoneos; 267 | VALIDATE_PRODUCT = YES; 268 | }; 269 | name = Release; 270 | }; 271 | 01FA7D40145B5FCC00D118DB /* Debug */ = { 272 | isa = XCBuildConfiguration; 273 | buildSettings = { 274 | CLANG_ENABLE_OBJC_ARC = YES; 275 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 276 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 277 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 278 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 279 | PRODUCT_NAME = "$(TARGET_NAME)"; 280 | WRAPPER_EXTENSION = app; 281 | }; 282 | name = Debug; 283 | }; 284 | 01FA7D41145B5FCC00D118DB /* Release */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 290 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 291 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | WRAPPER_EXTENSION = app; 294 | }; 295 | name = Release; 296 | }; 297 | /* End XCBuildConfiguration section */ 298 | 299 | /* Begin XCConfigurationList section */ 300 | 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */ = { 301 | isa = XCConfigurationList; 302 | buildConfigurations = ( 303 | 01FA7D3D145B5FCC00D118DB /* Debug */, 304 | 01FA7D3E145B5FCC00D118DB /* Release */, 305 | ); 306 | defaultConfigurationIsVisible = 0; 307 | defaultConfigurationName = Release; 308 | }; 309 | 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */ = { 310 | isa = XCConfigurationList; 311 | buildConfigurations = ( 312 | 01FA7D40145B5FCC00D118DB /* Debug */, 313 | 01FA7D41145B5FCC00D118DB /* Release */, 314 | ); 315 | defaultConfigurationIsVisible = 0; 316 | defaultConfigurationName = Release; 317 | }; 318 | /* End XCConfigurationList section */ 319 | }; 320 | rootObject = 01FA7D18145B5FCB00D118DB /* Project object */; 321 | } 322 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | @property (strong, nonatomic) ViewController *viewController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | // Override point for customization after application launch. 19 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; 20 | self.window.rootViewController = self.viewController; 21 | [self.window makeKeyAndVisible]; 22 | return YES; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicklockwood/SwipeView/b3d7b667d05325b9c0383e718c05a16240eccf07/Examples/Controls Example/SwipeViewExample/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/ItemView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1296 5 | 12B19 6 | 2549 7 | 1187 8 | 624.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1498 12 | 13 | 14 | IBProxyObject 15 | IBUIButton 16 | IBUISlider 17 | IBUISwitch 18 | IBUIView 19 | 20 | 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | PluginDependencyRecalculationVersion 25 | 26 | 27 | 28 | 29 | IBFilesOwner 30 | IBCocoaTouchFramework 31 | 32 | 33 | IBFirstResponder 34 | IBCocoaTouchFramework 35 | 36 | 37 | 38 | 292 39 | 40 | 41 | 42 | 293 43 | {{20, 20}, {160, 37}} 44 | 45 | 46 | 47 | _NS:225 48 | NO 49 | IBCocoaTouchFramework 50 | 0 51 | 0 52 | 1 53 | Press me! 54 | 55 | 3 56 | MQA 57 | 58 | 59 | 1 60 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 61 | 62 | 63 | 3 64 | MC41AA 65 | 66 | 67 | 2 68 | 15 69 | 70 | 71 | Helvetica-Bold 72 | 15 73 | 16 74 | 75 | 76 | 77 | 78 | 293 79 | {{46, 86}, {94, 27}} 80 | 81 | 82 | 83 | _NS:606 84 | NO 85 | IBCocoaTouchFramework 86 | 0 87 | 0 88 | YES 89 | 90 | 91 | 92 | 293 93 | {{41, 146}, {118, 23}} 94 | 95 | 96 | _NS:623 97 | NO 98 | IBCocoaTouchFramework 99 | 0 100 | 0 101 | 0.5 102 | 103 | 104 | {200, 200} 105 | 106 | 107 | 108 | 109 | 3 110 | MQA 111 | 112 | 2 113 | 114 | 115 | IBCocoaTouchFramework 116 | 117 | 118 | 119 | 120 | 121 | 122 | pressedButton: 123 | 124 | 125 | 7 126 | 127 | 6 128 | 129 | 130 | 131 | toggledSwitch: 132 | 133 | 134 | 13 135 | 136 | 7 137 | 138 | 139 | 140 | changedSlider: 141 | 142 | 143 | 13 144 | 145 | 8 146 | 147 | 148 | 149 | 150 | 151 | 0 152 | 153 | 154 | 155 | 156 | 157 | 1 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | -1 168 | 169 | 170 | File's Owner 171 | 172 | 173 | -2 174 | 175 | 176 | 177 | 178 | 3 179 | 180 | 181 | 182 | 183 | 4 184 | 185 | 186 | 187 | 188 | 5 189 | 190 | 191 | 192 | 193 | 194 | 195 | ViewController 196 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 197 | UIResponder 198 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 199 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 200 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 201 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 202 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 203 | 204 | 205 | 206 | 207 | 208 | 9 209 | 210 | 211 | 212 | 213 | SwipeView 214 | UIView 215 | 216 | id 217 | id 218 | 219 | 220 | 221 | dataSource 222 | id 223 | 224 | 225 | delegate 226 | id 227 | 228 | 229 | 230 | IBProjectSource 231 | ./Classes/SwipeView.h 232 | 233 | 234 | 235 | ViewController 236 | UIViewController 237 | 238 | id 239 | id 240 | id 241 | id 242 | 243 | 244 | 245 | changedSlider: 246 | id 247 | 248 | 249 | pageControlTapped 250 | id 251 | 252 | 253 | pressedButton: 254 | id 255 | 256 | 257 | toggledSwitch: 258 | id 259 | 260 | 261 | 262 | UILabel 263 | UIPageControl 264 | SwipeView 265 | 266 | 267 | 268 | label 269 | UILabel 270 | 271 | 272 | pageControl 273 | UIPageControl 274 | 275 | 276 | swipeView 277 | SwipeView 278 | 279 | 280 | 281 | IBProjectSource 282 | ./Classes/ViewController.h 283 | 284 | 285 | 286 | 287 | 0 288 | IBCocoaTouchFramework 289 | 290 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 291 | 292 | 293 | YES 294 | 3 295 | 1498 296 | 297 | 298 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/SwipeViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.charcoaldesign.${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 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/SwipeViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SwipeViewExample' target in the 'SwipeViewExample' 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 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SwipeView.h" 11 | 12 | 13 | @interface ViewController : UIViewController 14 | 15 | @property (nonatomic, strong) IBOutlet SwipeView *swipeView; 16 | @property (nonatomic, strong) IBOutlet UILabel *label; 17 | 18 | - (IBAction)pressedButton:(id)sender; 19 | - (IBAction)toggledSwitch:(id)sender; 20 | - (IBAction)changedSlider:(id)sender; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | @implementation ViewController 13 | 14 | - (void)viewDidLoad 15 | { 16 | [super viewDidLoad]; 17 | 18 | //configure swipe view 19 | _swipeView.alignment = SwipeViewAlignmentCenter; 20 | _swipeView.pagingEnabled = YES; 21 | _swipeView.itemsPerPage = 1; 22 | _swipeView.truncateFinalPage = YES; 23 | } 24 | 25 | - (void)dealloc 26 | { 27 | _swipeView.delegate = nil; 28 | _swipeView.dataSource = nil; 29 | } 30 | 31 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 32 | { 33 | return YES; 34 | } 35 | 36 | - (NSInteger)numberOfItemsInSwipeView:(SwipeView *)swipeView 37 | { 38 | //generate 100 item views 39 | //normally we'd use a backing array 40 | //as shown in the basic iOS example 41 | //but for this example we haven't bothered 42 | return 100; 43 | } 44 | 45 | - (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view 46 | { 47 | if (!view) 48 | { 49 | //load new item view instance from nib 50 | //control events are bound to view controller in nib file 51 | //note that it is only safe to use the reusingView if we return the same nib for each 52 | //item view, if different items have different contents, ignore the reusingView value 53 | view = [[NSBundle mainBundle] loadNibNamed:@"ItemView" owner:self options:nil][0]; 54 | } 55 | return view; 56 | } 57 | 58 | #pragma mark - 59 | #pragma mark Control events 60 | 61 | - (IBAction)pressedButton:(id)sender 62 | { 63 | _label.text = [NSString stringWithFormat:@"Button %i pressed", [_swipeView indexOfItemViewOrSubview:sender]]; 64 | } 65 | 66 | - (IBAction)toggledSwitch:(id)sender 67 | { 68 | _label.text = [NSString stringWithFormat:@"Switch %i toggled", [_swipeView indexOfItemViewOrSubview:sender]]; 69 | } 70 | 71 | - (IBAction)changedSlider:(id)sender 72 | { 73 | _label.text = [NSString stringWithFormat:@"Slider %i changed", [_swipeView indexOfItemViewOrSubview:sender]]; 74 | } 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1296 5 | 12B19 6 | 2549 7 | 1187 8 | 624.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1498 12 | 13 | 14 | IBProxyObject 15 | IBUILabel 16 | IBUIView 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 274 41 | 42 | {320, 460} 43 | 44 | 45 | _NS:196 46 | 47 | 3 48 | MCAwAA 49 | 50 | IBCocoaTouchFramework 51 | 52 | 53 | 54 | 298 55 | {{20, 410}, {280, 21}} 56 | 57 | 58 | _NS:328 59 | NO 60 | YES 61 | 7 62 | NO 63 | IBCocoaTouchFramework 64 | 65 | 66 | 3 67 | MQA 68 | 69 | 70 | 1 71 | 10 72 | 1 73 | 74 | 1 75 | 17 76 | 77 | 78 | Helvetica 79 | 17 80 | 16 81 | 82 | 83 | 84 | {{0, 20}, {320, 460}} 85 | 86 | 87 | 88 | 89 | 3 90 | MC43NQA 91 | 92 | 2 93 | 94 | 95 | NO 96 | 97 | IBCocoaTouchFramework 98 | 99 | 100 | 101 | 102 | 103 | 104 | view 105 | 106 | 107 | 108 | 7 109 | 110 | 111 | 112 | swipeView 113 | 114 | 115 | 116 | 11 117 | 118 | 119 | 120 | label 121 | 122 | 123 | 124 | 16 125 | 126 | 127 | 128 | dataSource 129 | 130 | 131 | 132 | 9 133 | 134 | 135 | 136 | delegate 137 | 138 | 139 | 140 | 10 141 | 142 | 143 | 144 | 145 | 146 | 0 147 | 148 | 149 | 150 | 151 | 152 | -1 153 | 154 | 155 | File's Owner 156 | 157 | 158 | -2 159 | 160 | 161 | 162 | 163 | 6 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 8 173 | 174 | 175 | 176 | 177 | 178 | 15 179 | 180 | 181 | 182 | 183 | 184 | 185 | ViewController 186 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 187 | UIResponder 188 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 189 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 190 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 191 | SwipeView 192 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 193 | 194 | 195 | 196 | 197 | 198 | 16 199 | 200 | 201 | 202 | 203 | SwipeView 204 | UIView 205 | 206 | id 207 | id 208 | 209 | 210 | 211 | dataSource 212 | id 213 | 214 | 215 | delegate 216 | id 217 | 218 | 219 | 220 | IBProjectSource 221 | ./Classes/SwipeView.h 222 | 223 | 224 | 225 | ViewController 226 | UIViewController 227 | 228 | id 229 | id 230 | id 231 | id 232 | 233 | 234 | 235 | changedSlider: 236 | id 237 | 238 | 239 | pageControlTapped 240 | id 241 | 242 | 243 | pressedButton: 244 | id 245 | 246 | 247 | toggledSwitch: 248 | id 249 | 250 | 251 | 252 | UILabel 253 | UIPageControl 254 | SwipeView 255 | 256 | 257 | 258 | label 259 | UILabel 260 | 261 | 262 | pageControl 263 | UIPageControl 264 | 265 | 266 | swipeView 267 | SwipeView 268 | 269 | 270 | 271 | IBProjectSource 272 | ./Classes/ViewController.h 273 | 274 | 275 | 276 | 277 | 0 278 | IBCocoaTouchFramework 279 | 280 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 281 | 282 | 283 | YES 284 | 3 285 | 1498 286 | 287 | 288 | -------------------------------------------------------------------------------- /Examples/Controls Example/SwipeViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. 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 | -------------------------------------------------------------------------------- /Examples/Paging Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // iCarouselExampleAppDelegate.h 3 | // iCarouselExample 4 | // 5 | // Created by Nick Lockwood on 03/04/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ExampleViewController; 12 | 13 | @interface AppDelegate : NSObject 14 | 15 | @property (nonatomic, strong) IBOutlet UIWindow *window; 16 | @property (nonatomic, strong) IBOutlet ExampleViewController *viewController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/Paging Example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // iCarouselExampleAppDelegate.m 3 | // iCarouselExample 4 | // 5 | // Created by Nick Lockwood on 03/04/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ExampleViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 17 | _window.rootViewController = _viewController; 18 | [_window makeKeyAndVisible]; 19 | return YES; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Examples/Paging Example/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicklockwood/SwipeView/b3d7b667d05325b9c0383e718c05a16240eccf07/Examples/Paging Example/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples/Paging Example/ExampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // iCarouselExampleViewController.h 3 | // iCarouselExample 4 | // 5 | // Created by Nick Lockwood on 03/04/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SwipeView.h" 11 | 12 | 13 | @interface ExampleViewController : UIViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Examples/Paging Example/ExampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // iCarouselExampleViewController.m 3 | // iCarouselExample 4 | // 5 | // Created by Nick Lockwood on 03/04/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import "ExampleViewController.h" 10 | 11 | 12 | @interface ExampleViewController () 13 | 14 | @property (nonatomic, weak) IBOutlet SwipeView *swipeView; 15 | @property (nonatomic, strong) NSMutableArray *items; 16 | 17 | @end 18 | 19 | 20 | @implementation ExampleViewController 21 | 22 | - (void)awakeFromNib 23 | { 24 | //set up data 25 | //your swipeView should always be driven by an array of 26 | //data of some kind - don't store data in your item views 27 | //or the recycling mechanism will destroy your data once 28 | //your item views move off-screen 29 | self.items = [NSMutableArray array]; 30 | for (int i = 0; i < 100; i++) 31 | { 32 | [_items addObject:@(i)]; 33 | } 34 | } 35 | 36 | - (void)dealloc 37 | { 38 | //it's a good idea to set these to nil here to avoid 39 | //sending messages to a deallocated viewcontroller 40 | //this is true even if your project is using ARC, unless 41 | //you are targeting iOS 5 as a minimum deployment target 42 | _swipeView.delegate = nil; 43 | _swipeView.dataSource = nil; 44 | } 45 | 46 | #pragma mark - 47 | #pragma mark View lifecycle 48 | 49 | - (void)viewDidLoad 50 | { 51 | [super viewDidLoad]; 52 | 53 | //configure swipeView 54 | _swipeView.pagingEnabled = YES; 55 | } 56 | 57 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 58 | { 59 | return YES; 60 | } 61 | 62 | #pragma mark - 63 | #pragma mark iCarousel methods 64 | 65 | - (NSInteger)numberOfItemsInSwipeView:(SwipeView *)swipeView 66 | { 67 | //return the total number of items in the carousel 68 | return [_items count]; 69 | } 70 | 71 | - (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view 72 | { 73 | UILabel *label = nil; 74 | 75 | //create new view if no view is available for recycling 76 | if (view == nil) 77 | { 78 | //don't do anything specific to the index within 79 | //this `if (view == nil) {...}` statement because the view will be 80 | //recycled and used with other index values later 81 | view = [[UIView alloc] initWithFrame:self.swipeView.bounds]; 82 | view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 83 | 84 | label = [[UILabel alloc] initWithFrame:view.bounds]; 85 | label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 86 | label.backgroundColor = [UIColor clearColor]; 87 | label.textAlignment = NSTextAlignmentCenter; 88 | label.font = [label.font fontWithSize:50]; 89 | label.tag = 1; 90 | [view addSubview:label]; 91 | } 92 | else 93 | { 94 | //get a reference to the label in the recycled view 95 | label = (UILabel *)[view viewWithTag:1]; 96 | } 97 | 98 | //set background color 99 | CGFloat red = arc4random() / (CGFloat)INT_MAX; 100 | CGFloat green = arc4random() / (CGFloat)INT_MAX; 101 | CGFloat blue = arc4random() / (CGFloat)INT_MAX; 102 | view.backgroundColor = [UIColor colorWithRed:red 103 | green:green 104 | blue:blue 105 | alpha:1.0]; 106 | 107 | //set item label 108 | //remember to always set any properties of your carousel item 109 | //views outside of the `if (view == nil) {...}` check otherwise 110 | //you'll get weird issues with carousel item content appearing 111 | //in the wrong place in the carousel 112 | label.text = [_items[index] stringValue]; 113 | 114 | return view; 115 | } 116 | 117 | - (CGSize)swipeViewItemSize:(SwipeView *)swipeView 118 | { 119 | return self.swipeView.bounds.size; 120 | } 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /Examples/Paging Example/SwipeViewExample-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.charcoaldesign.${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 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortraitUpsideDown 34 | UIInterfaceOrientationPortrait 35 | UIInterfaceOrientationLandscapeLeft 36 | UIInterfaceOrientationLandscapeRight 37 | 38 | UIStatusBarHidden 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Examples/Paging Example/SwipeViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'iCarouselExample' target in the 'iCarouselExample' 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 | -------------------------------------------------------------------------------- /Examples/Paging Example/SwipeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 01308D9313491C3500453707 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01308D9213491C3500453707 /* UIKit.framework */; }; 11 | 01308D9513491C3500453707 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01308D9413491C3500453707 /* Foundation.framework */; }; 12 | 01308D9713491C3500453707 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01308D9613491C3500453707 /* CoreGraphics.framework */; }; 13 | 01308DC013491F7200453707 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01308DBF13491F7200453707 /* QuartzCore.framework */; }; 14 | 013F5C60168A59F500355CAD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 013F5C5F168A59F500355CAD /* Default-568h@2x.png */; }; 15 | 0148358813A36C2000E687AC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0148358313A36C2000E687AC /* main.m */; }; 16 | 0148359313A36C3700E687AC /* ExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0148358B13A36C3700E687AC /* ExampleViewController.m */; }; 17 | 0148359413A36C3700E687AC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0148358D13A36C3700E687AC /* AppDelegate.m */; }; 18 | 0148359513A36C3700E687AC /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0148358F13A36C3700E687AC /* MainWindow.xib */; }; 19 | 0148359613A36C3700E687AC /* ExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0148359113A36C3700E687AC /* ExampleViewController.xib */; }; 20 | 01715D4917FD6D980060B615 /* SwipeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 01715D4817FD6D980060B615 /* SwipeView.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 01308D9213491C3500453707 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 25 | 01308D9413491C3500453707 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 26 | 01308D9613491C3500453707 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 27 | 01308DBF13491F7200453707 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 28 | 013F5C5F168A59F500355CAD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = SOURCE_ROOT; }; 29 | 0148358313A36C2000E687AC /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; }; 30 | 0148358713A36C2000E687AC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; }; 31 | 0148358B13A36C3700E687AC /* ExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleViewController.m; sourceTree = SOURCE_ROOT; }; 32 | 0148358C13A36C3700E687AC /* ExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleViewController.h; sourceTree = SOURCE_ROOT; }; 33 | 0148358D13A36C3700E687AC /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; }; 34 | 0148358E13A36C3700E687AC /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; }; 35 | 0148359013A36C3700E687AC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = SOURCE_ROOT; }; 36 | 0148359213A36C3700E687AC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ExampleViewController.xib; sourceTree = SOURCE_ROOT; }; 37 | 01715D4717FD6D980060B615 /* SwipeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwipeView.h; sourceTree = ""; }; 38 | 01715D4817FD6D980060B615 /* SwipeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwipeView.m; sourceTree = ""; }; 39 | 01715D4A17FD6F070060B615 /* SwipeViewExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SwipeViewExample-Info.plist"; sourceTree = SOURCE_ROOT; }; 40 | 01715D4B17FD6F070060B615 /* SwipeViewExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SwipeViewExample-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 41 | 018BBCB413A375AF005CA505 /* SwipeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | 01308D8B13491C3500453707 /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | 01308DC013491F7200453707 /* QuartzCore.framework in Frameworks */, 50 | 01308D9313491C3500453707 /* UIKit.framework in Frameworks */, 51 | 01308D9513491C3500453707 /* Foundation.framework in Frameworks */, 52 | 01308D9713491C3500453707 /* CoreGraphics.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 01308D8313491C3500453707 = { 60 | isa = PBXGroup; 61 | children = ( 62 | 01715D4617FD6D980060B615 /* SwipeView */, 63 | 01308D9813491C3500453707 /* SwipeViewExample */, 64 | 01308D9113491C3500453707 /* Frameworks */, 65 | 01308D8F13491C3500453707 /* Products */, 66 | ); 67 | sourceTree = ""; 68 | }; 69 | 01308D8F13491C3500453707 /* Products */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 018BBCB413A375AF005CA505 /* SwipeViewExample.app */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 01308D9113491C3500453707 /* Frameworks */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 01308DBF13491F7200453707 /* QuartzCore.framework */, 81 | 01308D9213491C3500453707 /* UIKit.framework */, 82 | 01308D9413491C3500453707 /* Foundation.framework */, 83 | 01308D9613491C3500453707 /* CoreGraphics.framework */, 84 | ); 85 | name = Frameworks; 86 | sourceTree = ""; 87 | }; 88 | 01308D9813491C3500453707 /* SwipeViewExample */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 0148358E13A36C3700E687AC /* AppDelegate.h */, 92 | 0148358D13A36C3700E687AC /* AppDelegate.m */, 93 | 0148358F13A36C3700E687AC /* MainWindow.xib */, 94 | 0148358C13A36C3700E687AC /* ExampleViewController.h */, 95 | 0148358B13A36C3700E687AC /* ExampleViewController.m */, 96 | 0148359113A36C3700E687AC /* ExampleViewController.xib */, 97 | 01308D9913491C3500453707 /* Supporting Files */, 98 | ); 99 | name = SwipeViewExample; 100 | path = iCarouselExample; 101 | sourceTree = ""; 102 | }; 103 | 01308D9913491C3500453707 /* Supporting Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 013F5C5F168A59F500355CAD /* Default-568h@2x.png */, 107 | 0148358313A36C2000E687AC /* main.m */, 108 | 01715D4A17FD6F070060B615 /* SwipeViewExample-Info.plist */, 109 | 01715D4B17FD6F070060B615 /* SwipeViewExample-Prefix.pch */, 110 | 0148358613A36C2000E687AC /* InfoPlist.strings */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | 01715D4617FD6D980060B615 /* SwipeView */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 01715D4717FD6D980060B615 /* SwipeView.h */, 119 | 01715D4817FD6D980060B615 /* SwipeView.m */, 120 | ); 121 | name = SwipeView; 122 | path = ../../SwipeView; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | 01308D8D13491C3500453707 /* SwipeViewExample */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = 01308DAF13491C3500453707 /* Build configuration list for PBXNativeTarget "SwipeViewExample" */; 131 | buildPhases = ( 132 | 01308D8A13491C3500453707 /* Sources */, 133 | 01308D8B13491C3500453707 /* Frameworks */, 134 | 01308D8C13491C3500453707 /* Resources */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = SwipeViewExample; 141 | productName = iCarouselExample; 142 | productReference = 018BBCB413A375AF005CA505 /* SwipeViewExample.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 01308D8513491C3500453707 /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 0500; 152 | }; 153 | buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "SwipeViewExample" */; 154 | compatibilityVersion = "Xcode 3.2"; 155 | developmentRegion = English; 156 | hasScannedForEncodings = 0; 157 | knownRegions = ( 158 | en, 159 | ); 160 | mainGroup = 01308D8313491C3500453707; 161 | productRefGroup = 01308D8F13491C3500453707 /* Products */; 162 | projectDirPath = ""; 163 | projectRoot = ""; 164 | targets = ( 165 | 01308D8D13491C3500453707 /* SwipeViewExample */, 166 | ); 167 | }; 168 | /* End PBXProject section */ 169 | 170 | /* Begin PBXResourcesBuildPhase section */ 171 | 01308D8C13491C3500453707 /* Resources */ = { 172 | isa = PBXResourcesBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | 0148359513A36C3700E687AC /* MainWindow.xib in Resources */, 176 | 0148359613A36C3700E687AC /* ExampleViewController.xib in Resources */, 177 | 013F5C60168A59F500355CAD /* Default-568h@2x.png in Resources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXResourcesBuildPhase section */ 182 | 183 | /* Begin PBXSourcesBuildPhase section */ 184 | 01308D8A13491C3500453707 /* Sources */ = { 185 | isa = PBXSourcesBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | 0148358813A36C2000E687AC /* main.m in Sources */, 189 | 0148359313A36C3700E687AC /* ExampleViewController.m in Sources */, 190 | 0148359413A36C3700E687AC /* AppDelegate.m in Sources */, 191 | 01715D4917FD6D980060B615 /* SwipeView.m in Sources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXSourcesBuildPhase section */ 196 | 197 | /* Begin PBXVariantGroup section */ 198 | 0148358613A36C2000E687AC /* InfoPlist.strings */ = { 199 | isa = PBXVariantGroup; 200 | children = ( 201 | 0148358713A36C2000E687AC /* en */, 202 | ); 203 | name = InfoPlist.strings; 204 | sourceTree = ""; 205 | }; 206 | 0148358F13A36C3700E687AC /* MainWindow.xib */ = { 207 | isa = PBXVariantGroup; 208 | children = ( 209 | 0148359013A36C3700E687AC /* en */, 210 | ); 211 | name = MainWindow.xib; 212 | sourceTree = ""; 213 | }; 214 | 0148359113A36C3700E687AC /* ExampleViewController.xib */ = { 215 | isa = PBXVariantGroup; 216 | children = ( 217 | 0148359213A36C3700E687AC /* en */, 218 | ); 219 | name = ExampleViewController.xib; 220 | sourceTree = ""; 221 | }; 222 | /* End PBXVariantGroup section */ 223 | 224 | /* Begin XCBuildConfiguration section */ 225 | 01308DAD13491C3500453707 /* Debug */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 229 | GCC_C_LANGUAGE_STANDARD = gnu99; 230 | GCC_OPTIMIZATION_LEVEL = 0; 231 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 232 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 233 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 234 | GCC_VERSION = com.apple.compilers.llvmgcc42; 235 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 236 | GCC_WARN_UNUSED_VARIABLE = YES; 237 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 238 | ONLY_ACTIVE_ARCH = YES; 239 | RUN_CLANG_STATIC_ANALYZER = YES; 240 | SDKROOT = iphoneos; 241 | }; 242 | name = Debug; 243 | }; 244 | 01308DAE13491C3500453707 /* Release */ = { 245 | isa = XCBuildConfiguration; 246 | buildSettings = { 247 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 248 | GCC_C_LANGUAGE_STANDARD = gnu99; 249 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 250 | GCC_VERSION = com.apple.compilers.llvmgcc42; 251 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 252 | GCC_WARN_UNUSED_VARIABLE = YES; 253 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 254 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 255 | RUN_CLANG_STATIC_ANALYZER = YES; 256 | SDKROOT = iphoneos; 257 | }; 258 | name = Release; 259 | }; 260 | 01308DB013491C3500453707 /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | ALWAYS_SEARCH_USER_PATHS = NO; 264 | CLANG_ENABLE_OBJC_ARC = YES; 265 | COPY_PHASE_STRIP = NO; 266 | GCC_DYNAMIC_NO_PIC = NO; 267 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 268 | GCC_PREFIX_HEADER = "SwipeViewExample-Prefix.pch"; 269 | GCC_THUMB_SUPPORT = NO; 270 | GCC_VERSION = ""; 271 | INFOPLIST_FILE = "SwipeViewExample-Info.plist"; 272 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 273 | PRODUCT_NAME = SwipeViewExample; 274 | TARGETED_DEVICE_FAMILY = "1,2"; 275 | WRAPPER_EXTENSION = app; 276 | }; 277 | name = Debug; 278 | }; 279 | 01308DB113491C3500453707 /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_ENABLE_OBJC_ARC = YES; 284 | COPY_PHASE_STRIP = YES; 285 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 286 | GCC_PREFIX_HEADER = "SwipeViewExample-Prefix.pch"; 287 | GCC_THUMB_SUPPORT = NO; 288 | GCC_VERSION = ""; 289 | INFOPLIST_FILE = "SwipeViewExample-Info.plist"; 290 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 291 | PRODUCT_NAME = SwipeViewExample; 292 | TARGETED_DEVICE_FAMILY = "1,2"; 293 | VALIDATE_PRODUCT = YES; 294 | WRAPPER_EXTENSION = app; 295 | }; 296 | name = Release; 297 | }; 298 | /* End XCBuildConfiguration section */ 299 | 300 | /* Begin XCConfigurationList section */ 301 | 01308D8813491C3500453707 /* Build configuration list for PBXProject "SwipeViewExample" */ = { 302 | isa = XCConfigurationList; 303 | buildConfigurations = ( 304 | 01308DAD13491C3500453707 /* Debug */, 305 | 01308DAE13491C3500453707 /* Release */, 306 | ); 307 | defaultConfigurationIsVisible = 0; 308 | defaultConfigurationName = Release; 309 | }; 310 | 01308DAF13491C3500453707 /* Build configuration list for PBXNativeTarget "SwipeViewExample" */ = { 311 | isa = XCConfigurationList; 312 | buildConfigurations = ( 313 | 01308DB013491C3500453707 /* Debug */, 314 | 01308DB113491C3500453707 /* Release */, 315 | ); 316 | defaultConfigurationIsVisible = 0; 317 | defaultConfigurationName = Release; 318 | }; 319 | /* End XCConfigurationList section */ 320 | }; 321 | rootObject = 01308D8513491C3500453707 /* Project object */; 322 | } 323 | -------------------------------------------------------------------------------- /Examples/Paging Example/SwipeViewExample.xcodeproj/xcshareddata/xcschemes/SwipeViewExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Examples/Paging Example/en.lproj/ExampleViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12F37 6 | 3084 7 | 1187.39 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIView 17 | 18 | 19 | YES 20 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 21 | 22 | 23 | PluginDependencyRecalculationVersion 24 | 25 | 26 | 27 | YES 28 | 29 | IBFilesOwner 30 | IBCocoaTouchFramework 31 | 32 | 33 | IBFirstResponder 34 | IBCocoaTouchFramework 35 | 36 | 37 | 38 | 274 39 | 40 | YES 41 | 42 | 43 | 274 44 | {320, 460} 45 | 46 | 47 | 48 | 49 | 3 50 | MSAwAA 51 | 52 | 2 53 | 54 | 55 | IBCocoaTouchFramework 56 | 57 | 58 | {{0, 20}, {320, 460}} 59 | 60 | 61 | 62 | 63 | 3 64 | MC43NQA 65 | 66 | 67 | NO 68 | 69 | IBCocoaTouchFramework 70 | 71 | 72 | 73 | 74 | YES 75 | 76 | 77 | view 78 | 79 | 80 | 81 | 7 82 | 83 | 84 | 85 | swipeView 86 | 87 | 88 | 89 | 38 90 | 91 | 92 | 93 | dataSource 94 | 95 | 96 | 97 | 10 98 | 99 | 100 | 101 | delegate 102 | 103 | 104 | 105 | 11 106 | 107 | 108 | 109 | 110 | YES 111 | 112 | 0 113 | 114 | YES 115 | 116 | 117 | 118 | 119 | 120 | -1 121 | 122 | 123 | File's Owner 124 | 125 | 126 | -2 127 | 128 | 129 | 130 | 131 | 6 132 | 133 | 134 | YES 135 | 136 | 137 | 138 | 139 | 140 | 8 141 | 142 | 143 | 144 | 145 | 146 | 147 | YES 148 | 149 | YES 150 | -1.CustomClassName 151 | -1.IBPluginDependency 152 | -2.CustomClassName 153 | -2.IBPluginDependency 154 | 6.IBPluginDependency 155 | 8.CustomClassName 156 | 8.IBPluginDependency 157 | 158 | 159 | YES 160 | ExampleViewController 161 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 162 | UIResponder 163 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 164 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 165 | SwipeView 166 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 167 | 168 | 169 | 170 | YES 171 | 172 | 173 | 174 | 175 | 176 | YES 177 | 178 | 179 | 180 | 181 | 38 182 | 183 | 184 | 185 | YES 186 | 187 | ExampleViewController 188 | UIViewController 189 | 190 | swipeView 191 | SwipeView 192 | 193 | 194 | swipeView 195 | 196 | swipeView 197 | SwipeView 198 | 199 | 200 | 201 | IBProjectSource 202 | ./Classes/ExampleViewController.h 203 | 204 | 205 | 206 | SwipeView 207 | UIView 208 | 209 | YES 210 | 211 | YES 212 | dataSource 213 | delegate 214 | 215 | 216 | YES 217 | id 218 | id 219 | 220 | 221 | 222 | YES 223 | 224 | YES 225 | dataSource 226 | delegate 227 | 228 | 229 | YES 230 | 231 | dataSource 232 | id 233 | 234 | 235 | delegate 236 | id 237 | 238 | 239 | 240 | 241 | IBProjectSource 242 | ./Classes/SwipeView.h 243 | 244 | 245 | 246 | 247 | 0 248 | IBCocoaTouchFramework 249 | 250 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 251 | 252 | 253 | YES 254 | 3 255 | 2083 256 | 257 | 258 | -------------------------------------------------------------------------------- /Examples/Paging Example/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples/Paging Example/en.lproj/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12F37 6 | 3084 7 | 1187.39 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUICustomObject 17 | IBUIViewController 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | PluginDependencyRecalculationVersion 25 | 26 | 27 | 28 | YES 29 | 30 | IBFilesOwner 31 | IBCocoaTouchFramework 32 | 33 | 34 | IBFirstResponder 35 | IBCocoaTouchFramework 36 | 37 | 38 | IBCocoaTouchFramework 39 | 40 | 41 | ExampleViewController 42 | 43 | 44 | 1 45 | 1 46 | 47 | IBCocoaTouchFramework 48 | NO 49 | 50 | 51 | 52 | 53 | YES 54 | 55 | 56 | delegate 57 | 58 | 59 | 60 | 4 61 | 62 | 63 | 64 | viewController 65 | 66 | 67 | 68 | 11 69 | 70 | 71 | 72 | 73 | YES 74 | 75 | 0 76 | 77 | YES 78 | 79 | 80 | 81 | 82 | 83 | -1 84 | 85 | 86 | File's Owner 87 | 88 | 89 | 3 90 | 91 | 92 | iCarouselExample App Delegate 93 | 94 | 95 | -2 96 | 97 | 98 | 99 | 100 | 10 101 | 102 | 103 | 104 | 105 | 106 | 107 | YES 108 | 109 | YES 110 | -1.CustomClassName 111 | -1.IBPluginDependency 112 | -2.CustomClassName 113 | -2.IBPluginDependency 114 | 10.CustomClassName 115 | 10.IBPluginDependency 116 | 3.CustomClassName 117 | 3.IBPluginDependency 118 | 119 | 120 | YES 121 | UIApplication 122 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 123 | UIResponder 124 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 125 | ExampleViewController 126 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 127 | AppDelegate 128 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 129 | 130 | 131 | 132 | YES 133 | 134 | 135 | 136 | 137 | 138 | YES 139 | 140 | 141 | 142 | 143 | 16 144 | 145 | 146 | 147 | YES 148 | 149 | AppDelegate 150 | NSObject 151 | 152 | YES 153 | 154 | YES 155 | viewController 156 | window 157 | 158 | 159 | YES 160 | ExampleViewController 161 | UIWindow 162 | 163 | 164 | 165 | YES 166 | 167 | YES 168 | viewController 169 | window 170 | 171 | 172 | YES 173 | 174 | viewController 175 | ExampleViewController 176 | 177 | 178 | window 179 | UIWindow 180 | 181 | 182 | 183 | 184 | IBProjectSource 185 | ./Classes/AppDelegate.h 186 | 187 | 188 | 189 | ExampleViewController 190 | UIViewController 191 | 192 | swipeView 193 | SwipeView 194 | 195 | 196 | swipeView 197 | 198 | swipeView 199 | SwipeView 200 | 201 | 202 | 203 | IBProjectSource 204 | ./Classes/ExampleViewController.h 205 | 206 | 207 | 208 | SwipeView 209 | UIView 210 | 211 | YES 212 | 213 | YES 214 | dataSource 215 | delegate 216 | 217 | 218 | YES 219 | id 220 | id 221 | 222 | 223 | 224 | YES 225 | 226 | YES 227 | dataSource 228 | delegate 229 | 230 | 231 | YES 232 | 233 | dataSource 234 | id 235 | 236 | 237 | delegate 238 | id 239 | 240 | 241 | 242 | 243 | IBProjectSource 244 | ./Classes/SwipeView.h 245 | 246 | 247 | 248 | 249 | 0 250 | IBCocoaTouchFramework 251 | 252 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 253 | 254 | 255 | 256 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 257 | 258 | 259 | YES 260 | 3 261 | 2083 262 | 263 | 264 | -------------------------------------------------------------------------------- /Examples/Paging Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iCarouselExample 4 | // 5 | // Created by Nick Lockwood on 03/04/2011. 6 | // Copyright 2011 Charcoal Design. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool 14 | { 15 | int retVal = UIApplicationMain(argc, argv, nil, nil); 16 | return retVal; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | SwipeView 2 | 3 | Version 1.3.2, April 28th, 2014 4 | 5 | Copyright (C) 2010 Charcoal Design 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 23 | 3. This notice may not be removed or altered from any source distribution. -------------------------------------------------------------------------------- /SwipeView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "SwipeView" 3 | s.version = "1.3.2" 4 | s.summary = "Horizontal, paged scrolling views based on UIScrollView, with convenient functionality in UITableView-style." 5 | s.description = "SwipeView is a class designed to simplify the implementation of horizontal, paged scrolling views on iOS. It is based on a UIScrollView, but adds convenient functionality such as a UITableView-style dataSource/delegate interface and efficient view loading, unloading and recycling." 6 | s.homepage = "https://github.com/nicklockwood/SwipeView" 7 | s.license = { :type => 'zlib', :file => 'LICENCE.md' } 8 | s.author = { "Nick Lockwood" => "support@charcoaldesign.co.uk" } 9 | s.source = { :git => "https://github.com/nicklockwood/SwipeView.git", :tag => "1.3.2" } 10 | s.source_files = 'SwipeView' 11 | s.requires_arc = true 12 | s.platform = :ios 13 | end -------------------------------------------------------------------------------- /SwipeView/SwipeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwipeView.h 3 | // 4 | // Version 1.3.2 5 | // 6 | // Created by Nick Lockwood on 03/09/2010. 7 | // Copyright 2010 Charcoal Design 8 | // 9 | // Distributed under the permissive zlib License 10 | // Get the latest version of SwipeView from here: 11 | // 12 | // https://github.com/nicklockwood/SwipeView 13 | // 14 | // This software is provided 'as-is', without any express or implied 15 | // warranty. In no event will the authors be held liable for any damages 16 | // arising from the use of this software. 17 | // 18 | // Permission is granted to anyone to use this software for any purpose, 19 | // including commercial applications, and to alter it and redistribute it 20 | // freely, subject to the following restrictions: 21 | // 22 | // 1. The origin of this software must not be misrepresented; you must not 23 | // claim that you wrote the original software. If you use this software 24 | // in a product, an acknowledgment in the product documentation would be 25 | // appreciated but is not required. 26 | // 27 | // 2. Altered source versions must be plainly marked as such, and must not be 28 | // misrepresented as being the original software. 29 | // 30 | // 3. This notice may not be removed or altered from any source distribution. 31 | // 32 | 33 | 34 | #pragma GCC diagnostic push 35 | #pragma GCC diagnostic ignored "-Wauto-import" 36 | #pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis" 37 | 38 | 39 | #import 40 | #undef weak_delegate 41 | #if __has_feature(objc_arc) && __has_feature(objc_arc_weak) 42 | #define weak_delegate weak 43 | #else 44 | #define weak_delegate unsafe_unretained 45 | #endif 46 | 47 | 48 | #import 49 | 50 | 51 | typedef NS_ENUM(NSUInteger, SwipeViewAlignment) 52 | { 53 | SwipeViewAlignmentEdge = 0, 54 | SwipeViewAlignmentCenter 55 | }; 56 | 57 | 58 | @protocol SwipeViewDataSource, SwipeViewDelegate; 59 | 60 | @interface SwipeView : UIView 61 | 62 | @property (nonatomic, weak_delegate) IBOutlet id dataSource; 63 | @property (nonatomic, weak_delegate) IBOutlet id delegate; 64 | @property (nonatomic, readonly) NSInteger numberOfItems; 65 | @property (nonatomic, readonly) NSInteger numberOfPages; 66 | @property (nonatomic, readonly) CGSize itemSize; 67 | @property (nonatomic, assign) NSInteger itemsPerPage; 68 | @property (nonatomic, assign) BOOL truncateFinalPage; 69 | @property (nonatomic, strong, readonly) NSArray *indexesForVisibleItems; 70 | @property (nonatomic, strong, readonly) NSArray *visibleItemViews; 71 | @property (nonatomic, strong, readonly) UIView *currentItemView; 72 | @property (nonatomic, assign) NSInteger currentItemIndex; 73 | @property (nonatomic, assign) NSInteger currentPage; 74 | @property (nonatomic, assign) SwipeViewAlignment alignment; 75 | @property (nonatomic, assign) CGFloat scrollOffset; 76 | @property (nonatomic, assign, getter = isPagingEnabled) BOOL pagingEnabled; 77 | @property (nonatomic, assign, getter = isScrollEnabled) BOOL scrollEnabled; 78 | @property (nonatomic, assign, getter = isWrapEnabled) BOOL wrapEnabled; 79 | @property (nonatomic, assign) BOOL delaysContentTouches; 80 | @property (nonatomic, assign) BOOL bounces; 81 | @property (nonatomic, assign) float decelerationRate; 82 | @property (nonatomic, assign) CGFloat autoscroll; 83 | @property (nonatomic, readonly, getter = isDragging) BOOL dragging; 84 | @property (nonatomic, readonly, getter = isDecelerating) BOOL decelerating; 85 | @property (nonatomic, readonly, getter = isScrolling) BOOL scrolling; 86 | @property (nonatomic, assign) BOOL defersItemViewLoading; 87 | @property (nonatomic, assign, getter = isVertical) BOOL vertical; 88 | 89 | - (void)reloadData; 90 | - (void)reloadItemAtIndex:(NSInteger)index; 91 | - (void)scrollByOffset:(CGFloat)offset duration:(NSTimeInterval)duration; 92 | - (void)scrollToOffset:(CGFloat)offset duration:(NSTimeInterval)duration; 93 | - (void)scrollByNumberOfItems:(NSInteger)itemCount duration:(NSTimeInterval)duration; 94 | - (void)scrollToItemAtIndex:(NSInteger)index duration:(NSTimeInterval)duration; 95 | - (void)scrollToPage:(NSInteger)page duration:(NSTimeInterval)duration; 96 | - (UIView *)itemViewAtIndex:(NSInteger)index; 97 | - (NSInteger)indexOfItemView:(UIView *)view; 98 | - (NSInteger)indexOfItemViewOrSubview:(UIView *)view; 99 | 100 | @end 101 | 102 | 103 | @protocol SwipeViewDataSource 104 | 105 | - (NSInteger)numberOfItemsInSwipeView:(SwipeView *)swipeView; 106 | - (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view; 107 | 108 | @end 109 | 110 | 111 | @protocol SwipeViewDelegate 112 | @optional 113 | 114 | - (CGSize)swipeViewItemSize:(SwipeView *)swipeView; 115 | - (void)swipeViewDidScroll:(SwipeView *)swipeView; 116 | - (void)swipeViewCurrentItemIndexDidChange:(SwipeView *)swipeView; 117 | - (void)swipeViewWillBeginDragging:(SwipeView *)swipeView; 118 | - (void)swipeViewDidEndDragging:(SwipeView *)swipeView willDecelerate:(BOOL)decelerate; 119 | - (void)swipeViewWillBeginDecelerating:(SwipeView *)swipeView; 120 | - (void)swipeViewDidEndDecelerating:(SwipeView *)swipeView; 121 | - (void)swipeViewDidEndScrollingAnimation:(SwipeView *)swipeView; 122 | - (BOOL)swipeView:(SwipeView *)swipeView shouldSelectItemAtIndex:(NSInteger)index; 123 | - (void)swipeView:(SwipeView *)swipeView didSelectItemAtIndex:(NSInteger)index; 124 | 125 | @end 126 | 127 | 128 | #pragma GCC diagnostic pop 129 | 130 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 019466DB15B3129800B9CA30 /* SwipeView.m */; }; 11 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D25145B5FCC00D118DB /* UIKit.framework */; }; 12 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D27145B5FCC00D118DB /* Foundation.framework */; }; 13 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */; }; 14 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */; }; 15 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D31145B5FCC00D118DB /* main.m */; }; 16 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D35145B5FCC00D118DB /* AppDelegate.m */; }; 17 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D38145B5FCC00D118DB /* ViewController.m */; }; 18 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D3A145B5FCC00D118DB /* ViewController.xib */; }; 19 | 01FACD23166114E800B8C1A0 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 01FACD22166114E800B8C1A0 /* Default-568h@2x.png */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 019466DA15B3129800B9CA30 /* SwipeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwipeView.h; sourceTree = ""; }; 24 | 019466DB15B3129800B9CA30 /* SwipeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwipeView.m; sourceTree = ""; }; 25 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 28 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 29 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwipeViewExample-Info.plist"; sourceTree = ""; }; 30 | 01FA7D2F145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 31 | 01FA7D31145B5FCC00D118DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwipeViewExample-Prefix.pch"; sourceTree = ""; }; 33 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 01FA7D37145B5FCC00D118DB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 36 | 01FA7D38145B5FCC00D118DB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 37 | 01FA7D3B145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 38 | 01FACD22166114E800B8C1A0 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 01FA7D1E145B5FCC00D118DB /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */, 47 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */, 48 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 019466D915B3129800B9CA30 /* SwipeView */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 019466DA15B3129800B9CA30 /* SwipeView.h */, 59 | 019466DB15B3129800B9CA30 /* SwipeView.m */, 60 | ); 61 | name = SwipeView; 62 | path = ../../SwipeView; 63 | sourceTree = ""; 64 | }; 65 | 01FA7D16145B5FCB00D118DB = { 66 | isa = PBXGroup; 67 | children = ( 68 | 019466D915B3129800B9CA30 /* SwipeView */, 69 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */, 70 | 01FA7D24145B5FCC00D118DB /* Frameworks */, 71 | 01FA7D22145B5FCC00D118DB /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 01FA7D22145B5FCC00D118DB /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 01FA7D24145B5FCC00D118DB /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */, 87 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */, 88 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */, 97 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */, 98 | 01FA7D37145B5FCC00D118DB /* ViewController.h */, 99 | 01FA7D38145B5FCC00D118DB /* ViewController.m */, 100 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */, 101 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */, 102 | ); 103 | path = SwipeViewExample; 104 | sourceTree = ""; 105 | }; 106 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 01FACD22166114E800B8C1A0 /* Default-568h@2x.png */, 110 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */, 111 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */, 112 | 01FA7D31145B5FCC00D118DB /* main.m */, 113 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */; 124 | buildPhases = ( 125 | 01FA7D1D145B5FCC00D118DB /* Sources */, 126 | 01FA7D1E145B5FCC00D118DB /* Frameworks */, 127 | 01FA7D1F145B5FCC00D118DB /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = SwipeViewExample; 134 | productName = SwipeViewExample; 135 | productReference = 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | 01FA7D18145B5FCB00D118DB /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | LastUpgradeCheck = 0500; 145 | }; 146 | buildConfigurationList = 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */; 147 | compatibilityVersion = "Xcode 3.2"; 148 | developmentRegion = English; 149 | hasScannedForEncodings = 0; 150 | knownRegions = ( 151 | en, 152 | ); 153 | mainGroup = 01FA7D16145B5FCB00D118DB; 154 | productRefGroup = 01FA7D22145B5FCC00D118DB /* Products */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | 01FA7D1F145B5FCC00D118DB /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */, 169 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */, 170 | 01FACD23166114E800B8C1A0 /* Default-568h@2x.png in Resources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXResourcesBuildPhase section */ 175 | 176 | /* Begin PBXSourcesBuildPhase section */ 177 | 01FA7D1D145B5FCC00D118DB /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */, 182 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */, 183 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */, 184 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | 01FA7D2F145B5FCC00D118DB /* en */, 195 | ); 196 | name = InfoPlist.strings; 197 | sourceTree = ""; 198 | }; 199 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */ = { 200 | isa = PBXVariantGroup; 201 | children = ( 202 | 01FA7D3B145B5FCC00D118DB /* en */, 203 | ); 204 | name = ViewController.xib; 205 | sourceTree = ""; 206 | }; 207 | /* End PBXVariantGroup section */ 208 | 209 | /* Begin XCBuildConfiguration section */ 210 | 01FA7D3D145B5FCC00D118DB /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | CLANG_WARN_BOOL_CONVERSION = YES; 215 | CLANG_WARN_CONSTANT_CONVERSION = YES; 216 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 217 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 218 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 219 | CLANG_WARN_EMPTY_BODY = YES; 220 | CLANG_WARN_ENUM_CONVERSION = YES; 221 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 222 | CLANG_WARN_INT_CONVERSION = YES; 223 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 224 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 225 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 226 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; 227 | CLANG_WARN_OBJC_RECEIVER_WEAK = YES; 228 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 229 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 230 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 231 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 232 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 233 | COPY_PHASE_STRIP = NO; 234 | GCC_C_LANGUAGE_STANDARD = gnu99; 235 | GCC_DYNAMIC_NO_PIC = NO; 236 | GCC_OPTIMIZATION_LEVEL = 0; 237 | GCC_PREPROCESSOR_DEFINITIONS = ( 238 | "DEBUG=1", 239 | "$(inherited)", 240 | ); 241 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 242 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 243 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 244 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 245 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 246 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 247 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 248 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 249 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 250 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 251 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 252 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 253 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 254 | GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; 255 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 256 | GCC_WARN_PEDANTIC = YES; 257 | GCC_WARN_SHADOW = YES; 258 | GCC_WARN_SIGN_COMPARE = YES; 259 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 260 | GCC_WARN_UNDECLARED_SELECTOR = YES; 261 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 262 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 263 | GCC_WARN_UNUSED_FUNCTION = YES; 264 | GCC_WARN_UNUSED_LABEL = YES; 265 | GCC_WARN_UNUSED_PARAMETER = YES; 266 | GCC_WARN_UNUSED_VARIABLE = YES; 267 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 268 | ONLY_ACTIVE_ARCH = YES; 269 | RUN_CLANG_STATIC_ANALYZER = YES; 270 | SDKROOT = iphoneos; 271 | WARNING_CFLAGS = ( 272 | "-Weverything", 273 | "-Wno-objc-missing-property-synthesis", 274 | ); 275 | }; 276 | name = Debug; 277 | }; 278 | 01FA7D3E145B5FCC00D118DB /* Release */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_WARN_BOOL_CONVERSION = YES; 283 | CLANG_WARN_CONSTANT_CONVERSION = YES; 284 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 285 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 286 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 287 | CLANG_WARN_EMPTY_BODY = YES; 288 | CLANG_WARN_ENUM_CONVERSION = YES; 289 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 290 | CLANG_WARN_INT_CONVERSION = YES; 291 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 292 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 293 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 294 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; 295 | CLANG_WARN_OBJC_RECEIVER_WEAK = YES; 296 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 297 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 299 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 300 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 301 | COPY_PHASE_STRIP = YES; 302 | GCC_C_LANGUAGE_STANDARD = gnu99; 303 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 304 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 305 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 306 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 307 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 308 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 309 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 310 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 311 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 312 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 313 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 314 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 315 | GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; 316 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 317 | GCC_WARN_PEDANTIC = YES; 318 | GCC_WARN_SHADOW = YES; 319 | GCC_WARN_SIGN_COMPARE = YES; 320 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 321 | GCC_WARN_UNDECLARED_SELECTOR = YES; 322 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 323 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 324 | GCC_WARN_UNUSED_FUNCTION = YES; 325 | GCC_WARN_UNUSED_LABEL = YES; 326 | GCC_WARN_UNUSED_PARAMETER = YES; 327 | GCC_WARN_UNUSED_VARIABLE = YES; 328 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 329 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 330 | RUN_CLANG_STATIC_ANALYZER = YES; 331 | SDKROOT = iphoneos; 332 | VALIDATE_PRODUCT = YES; 333 | WARNING_CFLAGS = ( 334 | "-Weverything", 335 | "-Wno-objc-missing-property-synthesis", 336 | ); 337 | }; 338 | name = Release; 339 | }; 340 | 01FA7D40145B5FCC00D118DB /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 345 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 346 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 347 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 348 | PRODUCT_NAME = "$(TARGET_NAME)"; 349 | WRAPPER_EXTENSION = app; 350 | }; 351 | name = Debug; 352 | }; 353 | 01FA7D41145B5FCC00D118DB /* Release */ = { 354 | isa = XCBuildConfiguration; 355 | buildSettings = { 356 | CLANG_ENABLE_OBJC_ARC = YES; 357 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 358 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 359 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 360 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 361 | PRODUCT_NAME = "$(TARGET_NAME)"; 362 | WRAPPER_EXTENSION = app; 363 | }; 364 | name = Release; 365 | }; 366 | /* End XCBuildConfiguration section */ 367 | 368 | /* Begin XCConfigurationList section */ 369 | 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */ = { 370 | isa = XCConfigurationList; 371 | buildConfigurations = ( 372 | 01FA7D3D145B5FCC00D118DB /* Debug */, 373 | 01FA7D3E145B5FCC00D118DB /* Release */, 374 | ); 375 | defaultConfigurationIsVisible = 0; 376 | defaultConfigurationName = Release; 377 | }; 378 | 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */ = { 379 | isa = XCConfigurationList; 380 | buildConfigurations = ( 381 | 01FA7D40145B5FCC00D118DB /* Debug */, 382 | 01FA7D41145B5FCC00D118DB /* Release */, 383 | ); 384 | defaultConfigurationIsVisible = 0; 385 | defaultConfigurationName = Release; 386 | }; 387 | /* End XCConfigurationList section */ 388 | }; 389 | rootObject = 01FA7D18145B5FCB00D118DB /* Project object */; 390 | } 391 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | @property (strong, nonatomic) ViewController *viewController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions 15 | { 16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 17 | // Override point for customization after application launch. 18 | self.viewController = [[ViewController alloc] init]; 19 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; 20 | [self.window makeKeyAndVisible]; 21 | return YES; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicklockwood/SwipeView/b3d7b667d05325b9c0383e718c05a16240eccf07/Tests/Content Offsets/SwipeViewExample/Default-568h@2x.png -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/SwipeViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.charcoaldesign.${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 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/SwipeViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SwipeViewExample' target in the 'SwipeViewExample' 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 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SwipeView.h" 11 | 12 | 13 | @interface ViewController : UIViewController 14 | 15 | @property (nonatomic, strong) IBOutlet SwipeView *swipeView; 16 | @property (nonatomic, strong) IBOutlet UIPageControl *pageControl; 17 | 18 | - (IBAction)pageControlTapped; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSMutableArray *colors; 15 | 16 | @end 17 | 18 | 19 | @implementation ViewController 20 | 21 | @synthesize swipeView = _swipeView; 22 | @synthesize pageControl = _pageControl; 23 | @synthesize colors = _colors; 24 | 25 | 26 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 27 | { 28 | if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) 29 | { 30 | //set up colors 31 | self.colors = [NSMutableArray array]; 32 | for (int i = 0; i < 10; i++) 33 | { 34 | [self.colors addObject:[UIColor colorWithRed:rand()/(float)RAND_MAX 35 | green:rand()/(float)RAND_MAX 36 | blue:rand()/(float)RAND_MAX 37 | alpha:1.0f]]; 38 | } 39 | } 40 | return self; 41 | } 42 | 43 | - (void)viewDidLoad 44 | { 45 | [super viewDidLoad]; 46 | 47 | //configure swipe view 48 | self.swipeView.alignment = SwipeViewAlignmentCenter; 49 | self.swipeView.pagingEnabled = YES; 50 | self.swipeView.wrapEnabled = NO; 51 | self.swipeView.itemsPerPage = 3; 52 | self.swipeView.truncateFinalPage = YES; 53 | 54 | //configure page control 55 | self.pageControl.numberOfPages = self.swipeView.numberOfPages; 56 | self.pageControl.defersCurrentPageDisplay = YES; 57 | 58 | //add wrap toggle 59 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Toggle Wrap" 60 | style:UIBarButtonItemStylePlain 61 | target:self 62 | action:@selector(toggle)]; 63 | } 64 | 65 | - (void)toggle 66 | { 67 | self.swipeView.wrapEnabled = !self.swipeView.wrapEnabled; 68 | } 69 | 70 | - (BOOL)shouldAutorotateToInterfaceOrientation:(__unused UIInterfaceOrientation)interfaceOrientation 71 | { 72 | return YES; 73 | } 74 | 75 | - (NSInteger)numberOfItemsInSwipeView:(__unused SwipeView *)swipeView 76 | { 77 | return (NSInteger)[self.colors count]; 78 | } 79 | 80 | - (UIView *)swipeView:(__unused SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view 81 | { 82 | UILabel *label = (UILabel *)view; 83 | 84 | //create or reuse view 85 | if (view == nil) 86 | { 87 | label = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)]; 88 | label.textAlignment = UITextAlignmentCenter; 89 | label.textColor = [UIColor whiteColor]; 90 | view = label; 91 | } 92 | 93 | //configure view 94 | label.backgroundColor = (self.colors)[index]; 95 | label.text = [NSString stringWithFormat:@"%i", index]; 96 | 97 | //return view 98 | return view; 99 | } 100 | 101 | - (void)swipeViewCurrentItemIndexDidChange:(SwipeView *)swipeView 102 | { 103 | //update page control page 104 | self.pageControl.currentPage = swipeView.currentPage; 105 | } 106 | 107 | - (void)swipeView:(__unused SwipeView *)swipeView didSelectItemAtIndex:(NSInteger)index 108 | { 109 | NSLog(@"Selected item at index %i", index); 110 | } 111 | 112 | - (IBAction)pageControlTapped 113 | { 114 | //update swipe view page 115 | [self.swipeView scrollToPage:self.pageControl.currentPage duration:0.4]; 116 | } 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1536 5 | 12A206j 6 | 2541 7 | 1172.1 8 | 613.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1875 12 | 13 | 14 | IBProxyObject 15 | IBUIPageControl 16 | IBUIView 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 274 41 | 42 | {320, 460} 43 | 44 | 45 | _NS:196 46 | 47 | 3 48 | MCAwAA 49 | 50 | IBCocoaTouchFramework 51 | 52 | 53 | 54 | 1290 55 | 56 | {{0, 412}, {320, 36}} 57 | 58 | 59 | _NS:9 60 | NO 61 | IBCocoaTouchFramework 62 | 0 63 | 0 64 | 3 65 | 66 | 67 | {{0, 20}, {320, 460}} 68 | 69 | 70 | 71 | 72 | 3 73 | MC43NQA 74 | 75 | 2 76 | 77 | 78 | NO 79 | 80 | IBCocoaTouchFramework 81 | 82 | 83 | 84 | 85 | 86 | 87 | view 88 | 89 | 90 | 91 | 7 92 | 93 | 94 | 95 | swipeView 96 | 97 | 98 | 99 | 11 100 | 101 | 102 | 103 | pageControl 104 | 105 | 106 | 107 | 14 108 | 109 | 110 | 111 | dataSource 112 | 113 | 114 | 115 | 9 116 | 117 | 118 | 119 | delegate 120 | 121 | 122 | 123 | 10 124 | 125 | 126 | 127 | pageControlTapped 128 | 129 | 130 | 13 131 | 132 | 13 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 | 170 | 12 171 | 172 | 173 | 174 | 175 | 176 | 177 | ViewController 178 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 179 | UIResponder 180 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 181 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 182 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 183 | SwipeView 184 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 185 | 186 | 187 | 188 | 189 | 190 | 14 191 | 192 | 193 | 194 | 195 | SwipeView 196 | UIView 197 | 198 | id 199 | id 200 | 201 | 202 | 203 | dataSource 204 | id 205 | 206 | 207 | delegate 208 | id 209 | 210 | 211 | 212 | IBProjectSource 213 | ./Classes/SwipeView.h 214 | 215 | 216 | 217 | ViewController 218 | UIViewController 219 | 220 | pageControlTapped 221 | id 222 | 223 | 224 | pageControlTapped 225 | 226 | pageControlTapped 227 | id 228 | 229 | 230 | 231 | UIPageControl 232 | SwipeView 233 | 234 | 235 | 236 | pageControl 237 | UIPageControl 238 | 239 | 240 | swipeView 241 | SwipeView 242 | 243 | 244 | 245 | IBProjectSource 246 | ./Classes/ViewController.h 247 | 248 | 249 | 250 | 251 | 0 252 | IBCocoaTouchFramework 253 | YES 254 | 3 255 | 1875 256 | 257 | 258 | -------------------------------------------------------------------------------- /Tests/Content Offsets/SwipeViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool 16 | { 17 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0108F4AA17724B670081F592 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0108F4A917724B670081F592 /* Default-568h@2x.png */; }; 11 | 019466E115B312AA00B9CA30 /* SwipeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 019466E015B312AA00B9CA30 /* SwipeView.m */; }; 12 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D25145B5FCC00D118DB /* UIKit.framework */; }; 13 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D27145B5FCC00D118DB /* Foundation.framework */; }; 14 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */; }; 15 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */; }; 16 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D31145B5FCC00D118DB /* main.m */; }; 17 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D35145B5FCC00D118DB /* AppDelegate.m */; }; 18 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D38145B5FCC00D118DB /* ViewController.m */; }; 19 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D3A145B5FCC00D118DB /* ViewController.xib */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 0108F4A917724B670081F592 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 24 | 019466DF15B312AA00B9CA30 /* SwipeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwipeView.h; sourceTree = ""; }; 25 | 019466E015B312AA00B9CA30 /* SwipeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwipeView.m; sourceTree = ""; }; 26 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 28 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwipeViewExample-Info.plist"; sourceTree = ""; }; 31 | 01FA7D2F145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 32 | 01FA7D31145B5FCC00D118DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwipeViewExample-Prefix.pch"; sourceTree = ""; }; 34 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 01FA7D37145B5FCC00D118DB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | 01FA7D38145B5FCC00D118DB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | 01FA7D3B145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 01FA7D1E145B5FCC00D118DB /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */, 47 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */, 48 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 019466DE15B312AA00B9CA30 /* SwipeView */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 019466DF15B312AA00B9CA30 /* SwipeView.h */, 59 | 019466E015B312AA00B9CA30 /* SwipeView.m */, 60 | ); 61 | name = SwipeView; 62 | path = ../../SwipeView; 63 | sourceTree = ""; 64 | }; 65 | 01FA7D16145B5FCB00D118DB = { 66 | isa = PBXGroup; 67 | children = ( 68 | 019466DE15B312AA00B9CA30 /* SwipeView */, 69 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */, 70 | 01FA7D24145B5FCC00D118DB /* Frameworks */, 71 | 01FA7D22145B5FCC00D118DB /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 01FA7D22145B5FCC00D118DB /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 01FA7D24145B5FCC00D118DB /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */, 87 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */, 88 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */, 97 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */, 98 | 01FA7D37145B5FCC00D118DB /* ViewController.h */, 99 | 01FA7D38145B5FCC00D118DB /* ViewController.m */, 100 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */, 101 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */, 102 | ); 103 | path = SwipeViewExample; 104 | sourceTree = ""; 105 | }; 106 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 0108F4A917724B670081F592 /* Default-568h@2x.png */, 110 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */, 111 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */, 112 | 01FA7D31145B5FCC00D118DB /* main.m */, 113 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */; 124 | buildPhases = ( 125 | 01FA7D1D145B5FCC00D118DB /* Sources */, 126 | 01FA7D1E145B5FCC00D118DB /* Frameworks */, 127 | 01FA7D1F145B5FCC00D118DB /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = SwipeViewExample; 134 | productName = SwipeViewExample; 135 | productReference = 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | 01FA7D18145B5FCB00D118DB /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | LastUpgradeCheck = 0460; 145 | }; 146 | buildConfigurationList = 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */; 147 | compatibilityVersion = "Xcode 3.2"; 148 | developmentRegion = English; 149 | hasScannedForEncodings = 0; 150 | knownRegions = ( 151 | en, 152 | ); 153 | mainGroup = 01FA7D16145B5FCB00D118DB; 154 | productRefGroup = 01FA7D22145B5FCC00D118DB /* Products */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | 01FA7D1F145B5FCC00D118DB /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */, 169 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */, 170 | 0108F4AA17724B670081F592 /* Default-568h@2x.png in Resources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXResourcesBuildPhase section */ 175 | 176 | /* Begin PBXSourcesBuildPhase section */ 177 | 01FA7D1D145B5FCC00D118DB /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */, 182 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */, 183 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */, 184 | 019466E115B312AA00B9CA30 /* SwipeView.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | 01FA7D2F145B5FCC00D118DB /* en */, 195 | ); 196 | name = InfoPlist.strings; 197 | sourceTree = ""; 198 | }; 199 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */ = { 200 | isa = PBXVariantGroup; 201 | children = ( 202 | 01FA7D3B145B5FCC00D118DB /* en */, 203 | ); 204 | name = ViewController.xib; 205 | sourceTree = ""; 206 | }; 207 | /* End PBXVariantGroup section */ 208 | 209 | /* Begin XCBuildConfiguration section */ 210 | 01FA7D3D145B5FCC00D118DB /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 215 | CLANG_WARN_CONSTANT_CONVERSION = YES; 216 | CLANG_WARN_ENUM_CONVERSION = YES; 217 | CLANG_WARN_INT_CONVERSION = YES; 218 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 219 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 220 | COPY_PHASE_STRIP = NO; 221 | GCC_C_LANGUAGE_STANDARD = gnu99; 222 | GCC_DYNAMIC_NO_PIC = NO; 223 | GCC_OPTIMIZATION_LEVEL = 0; 224 | GCC_PREPROCESSOR_DEFINITIONS = ( 225 | "DEBUG=1", 226 | "$(inherited)", 227 | ); 228 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 229 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 230 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 231 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 232 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 235 | SDKROOT = iphoneos; 236 | }; 237 | name = Debug; 238 | }; 239 | 01FA7D3E145B5FCC00D118DB /* Release */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | ALWAYS_SEARCH_USER_PATHS = NO; 243 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_ENUM_CONVERSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 248 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 249 | COPY_PHASE_STRIP = YES; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 252 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 253 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 254 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 255 | GCC_WARN_UNUSED_VARIABLE = YES; 256 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 257 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 258 | SDKROOT = iphoneos; 259 | VALIDATE_PRODUCT = YES; 260 | }; 261 | name = Release; 262 | }; 263 | 01FA7D40145B5FCC00D118DB /* Debug */ = { 264 | isa = XCBuildConfiguration; 265 | buildSettings = { 266 | CLANG_ENABLE_OBJC_ARC = YES; 267 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 268 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 269 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 270 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 271 | PRODUCT_NAME = "$(TARGET_NAME)"; 272 | WRAPPER_EXTENSION = app; 273 | }; 274 | name = Debug; 275 | }; 276 | 01FA7D41145B5FCC00D118DB /* Release */ = { 277 | isa = XCBuildConfiguration; 278 | buildSettings = { 279 | CLANG_ENABLE_OBJC_ARC = YES; 280 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 281 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 282 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 283 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 284 | PRODUCT_NAME = "$(TARGET_NAME)"; 285 | WRAPPER_EXTENSION = app; 286 | }; 287 | name = Release; 288 | }; 289 | /* End XCBuildConfiguration section */ 290 | 291 | /* Begin XCConfigurationList section */ 292 | 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */ = { 293 | isa = XCConfigurationList; 294 | buildConfigurations = ( 295 | 01FA7D3D145B5FCC00D118DB /* Debug */, 296 | 01FA7D3E145B5FCC00D118DB /* Release */, 297 | ); 298 | defaultConfigurationIsVisible = 0; 299 | defaultConfigurationName = Release; 300 | }; 301 | 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */ = { 302 | isa = XCConfigurationList; 303 | buildConfigurations = ( 304 | 01FA7D40145B5FCC00D118DB /* Debug */, 305 | 01FA7D41145B5FCC00D118DB /* Release */, 306 | ); 307 | defaultConfigurationIsVisible = 0; 308 | defaultConfigurationName = Release; 309 | }; 310 | /* End XCConfigurationList section */ 311 | }; 312 | rootObject = 01FA7D18145B5FCB00D118DB /* Project object */; 313 | } 314 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @property (strong, nonatomic) ViewController *viewController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | @synthesize window = _window; 16 | @synthesize viewController = _viewController; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 21 | // Override point for customization after application launch. 22 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; 23 | self.window.rootViewController = self.viewController; 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 | @end 68 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicklockwood/SwipeView/b3d7b667d05325b9c0383e718c05a16240eccf07/Tests/Reload Test/SwipeViewExample/Default-568h@2x.png -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/SwipeViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.charcoaldesign.${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 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/SwipeViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SwipeViewExample' target in the 'SwipeViewExample' 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 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SwipeView.h" 11 | 12 | 13 | @interface ViewController : UIViewController 14 | 15 | @property (nonatomic, strong) IBOutlet SwipeView *swipeView; 16 | 17 | - (IBAction)reload; 18 | - (IBAction)forwards; 19 | - (IBAction)backwards; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSMutableArray *colors; 15 | 16 | @end 17 | 18 | 19 | @implementation ViewController 20 | 21 | - (IBAction)reload 22 | { 23 | //set up colors 24 | self.colors = [NSMutableArray array]; 25 | for (int i = 0; i < arc4random_uniform(1000) + 2; i++) 26 | { 27 | [self.colors addObject:[UIColor colorWithRed:drand48() 28 | green:drand48() 29 | blue:drand48() 30 | alpha:1.0f]]; 31 | } 32 | 33 | //reload content 34 | [_swipeView reloadData]; 35 | } 36 | 37 | - (IBAction)forwards 38 | { 39 | [_swipeView scrollByNumberOfItems:3 duration:1.4]; 40 | } 41 | 42 | - (IBAction)backwards 43 | { 44 | [_swipeView scrollByNumberOfItems:-3 duration:1.4]; 45 | } 46 | 47 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 48 | { 49 | if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) 50 | { 51 | //set up data 52 | [self reload]; 53 | } 54 | return self; 55 | } 56 | 57 | - (void)viewDidLoad 58 | { 59 | [super viewDidLoad]; 60 | 61 | //configure swipe view 62 | _swipeView.alignment = SwipeViewAlignmentCenter; 63 | _swipeView.pagingEnabled = YES; 64 | _swipeView.wrapEnabled = NO; 65 | _swipeView.truncateFinalPage = YES; 66 | 67 | //try scrolling immediately after load 68 | [_swipeView scrollToItemAtIndex:2 duration:0.0]; 69 | } 70 | 71 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 72 | { 73 | return YES; 74 | } 75 | 76 | - (NSInteger)numberOfItemsInSwipeView:(SwipeView *)swipeView 77 | { 78 | return [self.colors count]; 79 | } 80 | 81 | - (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view 82 | { 83 | UILabel *label = (UILabel *)view; 84 | 85 | //create or reuse view 86 | if (view == nil) 87 | { 88 | label = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)]; 89 | label.textAlignment = UITextAlignmentCenter; 90 | label.textColor = [UIColor whiteColor]; 91 | view = label; 92 | } 93 | 94 | //configure view 95 | label.backgroundColor = (self.colors)[index]; 96 | label.text = [NSString stringWithFormat:@"%i", index]; 97 | 98 | //return view 99 | return view; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1536 5 | 11E53 6 | 2818 7 | 1138.47 8 | 569.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1900 12 | 13 | 14 | IBProxyObject 15 | IBUIButton 16 | IBUIView 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 274 41 | 42 | 43 | 44 | 292 45 | {{225, 403}, {75, 37}} 46 | 47 | 48 | _NS:9 49 | NO 50 | IBCocoaTouchFramework 51 | 0 52 | 0 53 | 1 54 | Reload 55 | 56 | 3 57 | MQA 58 | 59 | 60 | 1 61 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 62 | 63 | 64 | 3 65 | MC41AA 66 | 67 | 68 | 2 69 | 15 70 | 71 | 72 | Helvetica-Bold 73 | 15 74 | 16 75 | 76 | 77 | 78 | 79 | 292 80 | {{20, 403}, {41, 40}} 81 | 82 | 83 | _NS:9 84 | NO 85 | IBCocoaTouchFramework 86 | 0 87 | 0 88 | 1 89 | < 90 | 91 | 92 | 1 93 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 292 102 | {{72, 403}, {41, 40}} 103 | 104 | 105 | _NS:9 106 | NO 107 | IBCocoaTouchFramework 108 | 0 109 | 0 110 | 1 111 | > 112 | 113 | 114 | 1 115 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 116 | 117 | 118 | 119 | 120 | 121 | 122 | {320, 460} 123 | 124 | 125 | _NS:196 126 | 127 | 3 128 | MCAwAA 129 | 130 | IBCocoaTouchFramework 131 | 132 | 133 | {{0, 20}, {320, 460}} 134 | 135 | 136 | 137 | 138 | 3 139 | MC43NQA 140 | 141 | 2 142 | 143 | 144 | NO 145 | 146 | IBCocoaTouchFramework 147 | 148 | 149 | 150 | 151 | 152 | 153 | view 154 | 155 | 156 | 157 | 7 158 | 159 | 160 | 161 | swipeView 162 | 163 | 164 | 165 | 11 166 | 167 | 168 | 169 | dataSource 170 | 171 | 172 | 173 | 9 174 | 175 | 176 | 177 | delegate 178 | 179 | 180 | 181 | 10 182 | 183 | 184 | 185 | reload 186 | 187 | 188 | 7 189 | 190 | 16 191 | 192 | 193 | 194 | backwards 195 | 196 | 197 | 7 198 | 199 | 19 200 | 201 | 202 | 203 | forwards 204 | 205 | 206 | 7 207 | 208 | 20 209 | 210 | 211 | 212 | 213 | 214 | 0 215 | 216 | 217 | 218 | 219 | 220 | -1 221 | 222 | 223 | File's Owner 224 | 225 | 226 | -2 227 | 228 | 229 | 230 | 231 | 6 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 8 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 15 250 | 251 | 252 | 253 | 254 | 17 255 | 256 | 257 | 258 | 259 | 18 260 | 261 | 262 | 263 | 264 | 265 | 266 | ViewController 267 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 268 | UIResponder 269 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 270 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 271 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 272 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 273 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 274 | SwipeView 275 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 276 | 277 | 278 | 279 | 280 | 281 | 20 282 | 283 | 284 | 285 | 286 | SwipeView 287 | UIView 288 | 289 | id 290 | id 291 | 292 | 293 | 294 | dataSource 295 | id 296 | 297 | 298 | delegate 299 | id 300 | 301 | 302 | 303 | IBProjectSource 304 | ./Classes/SwipeView.h 305 | 306 | 307 | 308 | ViewController 309 | UIViewController 310 | 311 | reload 312 | id 313 | 314 | 315 | reload 316 | 317 | reload 318 | id 319 | 320 | 321 | 322 | swipeView 323 | SwipeView 324 | 325 | 326 | swipeView 327 | 328 | swipeView 329 | SwipeView 330 | 331 | 332 | 333 | IBProjectSource 334 | ./Classes/ViewController.h 335 | 336 | 337 | 338 | 339 | 0 340 | IBCocoaTouchFramework 341 | 342 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 343 | 344 | 345 | YES 346 | 3 347 | 1900 348 | 349 | 350 | -------------------------------------------------------------------------------- /Tests/Reload Test/SwipeViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. 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 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0108F4AC17724BB50081F592 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0108F4AB17724BB50081F592 /* Default-568h@2x.png */; }; 11 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 019466DB15B3129800B9CA30 /* SwipeView.m */; }; 12 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D25145B5FCC00D118DB /* UIKit.framework */; }; 13 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D27145B5FCC00D118DB /* Foundation.framework */; }; 14 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */; }; 15 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */; }; 16 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D31145B5FCC00D118DB /* main.m */; }; 17 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D35145B5FCC00D118DB /* AppDelegate.m */; }; 18 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01FA7D38145B5FCC00D118DB /* ViewController.m */; }; 19 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01FA7D3A145B5FCC00D118DB /* ViewController.xib */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 0108F4AB17724BB50081F592 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 24 | 019466DA15B3129800B9CA30 /* SwipeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwipeView.h; sourceTree = ""; }; 25 | 019466DB15B3129800B9CA30 /* SwipeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SwipeView.m; sourceTree = ""; }; 26 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwipeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 28 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SwipeViewExample-Info.plist"; sourceTree = ""; }; 31 | 01FA7D2F145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 32 | 01FA7D31145B5FCC00D118DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwipeViewExample-Prefix.pch"; sourceTree = ""; }; 34 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 01FA7D37145B5FCC00D118DB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | 01FA7D38145B5FCC00D118DB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | 01FA7D3B145B5FCC00D118DB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 01FA7D1E145B5FCC00D118DB /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 01FA7D26145B5FCC00D118DB /* UIKit.framework in Frameworks */, 47 | 01FA7D28145B5FCC00D118DB /* Foundation.framework in Frameworks */, 48 | 01FA7D2A145B5FCC00D118DB /* CoreGraphics.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 019466D915B3129800B9CA30 /* SwipeView */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 019466DA15B3129800B9CA30 /* SwipeView.h */, 59 | 019466DB15B3129800B9CA30 /* SwipeView.m */, 60 | ); 61 | name = SwipeView; 62 | path = ../../SwipeView; 63 | sourceTree = ""; 64 | }; 65 | 01FA7D16145B5FCB00D118DB = { 66 | isa = PBXGroup; 67 | children = ( 68 | 019466D915B3129800B9CA30 /* SwipeView */, 69 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */, 70 | 01FA7D24145B5FCC00D118DB /* Frameworks */, 71 | 01FA7D22145B5FCC00D118DB /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 01FA7D22145B5FCC00D118DB /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 01FA7D24145B5FCC00D118DB /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 01FA7D25145B5FCC00D118DB /* UIKit.framework */, 87 | 01FA7D27145B5FCC00D118DB /* Foundation.framework */, 88 | 01FA7D29145B5FCC00D118DB /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 01FA7D2B145B5FCC00D118DB /* SwipeViewExample */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 01FA7D34145B5FCC00D118DB /* AppDelegate.h */, 97 | 01FA7D35145B5FCC00D118DB /* AppDelegate.m */, 98 | 01FA7D37145B5FCC00D118DB /* ViewController.h */, 99 | 01FA7D38145B5FCC00D118DB /* ViewController.m */, 100 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */, 101 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */, 102 | ); 103 | path = SwipeViewExample; 104 | sourceTree = ""; 105 | }; 106 | 01FA7D2C145B5FCC00D118DB /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 0108F4AB17724BB50081F592 /* Default-568h@2x.png */, 110 | 01FA7D2D145B5FCC00D118DB /* SwipeViewExample-Info.plist */, 111 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */, 112 | 01FA7D31145B5FCC00D118DB /* main.m */, 113 | 01FA7D33145B5FCC00D118DB /* SwipeViewExample-Prefix.pch */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */; 124 | buildPhases = ( 125 | 01FA7D1D145B5FCC00D118DB /* Sources */, 126 | 01FA7D1E145B5FCC00D118DB /* Frameworks */, 127 | 01FA7D1F145B5FCC00D118DB /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = SwipeViewExample; 134 | productName = SwipeViewExample; 135 | productReference = 01FA7D21145B5FCC00D118DB /* SwipeViewExample.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | 01FA7D18145B5FCB00D118DB /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | LastUpgradeCheck = 0500; 145 | }; 146 | buildConfigurationList = 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */; 147 | compatibilityVersion = "Xcode 3.2"; 148 | developmentRegion = English; 149 | hasScannedForEncodings = 0; 150 | knownRegions = ( 151 | en, 152 | ); 153 | mainGroup = 01FA7D16145B5FCB00D118DB; 154 | productRefGroup = 01FA7D22145B5FCC00D118DB /* Products */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | 01FA7D20145B5FCC00D118DB /* SwipeViewExample */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | 01FA7D1F145B5FCC00D118DB /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 01FA7D30145B5FCC00D118DB /* InfoPlist.strings in Resources */, 169 | 01FA7D3C145B5FCC00D118DB /* ViewController.xib in Resources */, 170 | 0108F4AC17724BB50081F592 /* Default-568h@2x.png in Resources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXResourcesBuildPhase section */ 175 | 176 | /* Begin PBXSourcesBuildPhase section */ 177 | 01FA7D1D145B5FCC00D118DB /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | 01FA7D32145B5FCC00D118DB /* main.m in Sources */, 182 | 01FA7D36145B5FCC00D118DB /* AppDelegate.m in Sources */, 183 | 01FA7D39145B5FCC00D118DB /* ViewController.m in Sources */, 184 | 019466DC15B3129800B9CA30 /* SwipeView.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | 01FA7D2E145B5FCC00D118DB /* InfoPlist.strings */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | 01FA7D2F145B5FCC00D118DB /* en */, 195 | ); 196 | name = InfoPlist.strings; 197 | sourceTree = ""; 198 | }; 199 | 01FA7D3A145B5FCC00D118DB /* ViewController.xib */ = { 200 | isa = PBXVariantGroup; 201 | children = ( 202 | 01FA7D3B145B5FCC00D118DB /* en */, 203 | ); 204 | name = ViewController.xib; 205 | sourceTree = ""; 206 | }; 207 | /* End PBXVariantGroup section */ 208 | 209 | /* Begin XCBuildConfiguration section */ 210 | 01FA7D3D145B5FCC00D118DB /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | CLANG_ENABLE_OBJC_ARC = YES; 215 | CLANG_WARN_BOOL_CONVERSION = YES; 216 | CLANG_WARN_CONSTANT_CONVERSION = YES; 217 | CLANG_WARN_EMPTY_BODY = YES; 218 | CLANG_WARN_ENUM_CONVERSION = YES; 219 | CLANG_WARN_INT_CONVERSION = YES; 220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | COPY_PHASE_STRIP = NO; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_DYNAMIC_NO_PIC = NO; 225 | GCC_OPTIMIZATION_LEVEL = 0; 226 | GCC_PREPROCESSOR_DEFINITIONS = ( 227 | "DEBUG=1", 228 | "$(inherited)", 229 | ); 230 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 231 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 232 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 233 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 234 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 235 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 236 | GCC_WARN_UNDECLARED_SELECTOR = YES; 237 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 238 | GCC_WARN_UNUSED_FUNCTION = YES; 239 | GCC_WARN_UNUSED_VARIABLE = YES; 240 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 241 | ONLY_ACTIVE_ARCH = YES; 242 | SDKROOT = iphoneos; 243 | WARNING_CFLAGS = ( 244 | "-Wall", 245 | "-Wextra", 246 | ); 247 | }; 248 | name = Debug; 249 | }; 250 | 01FA7D3E145B5FCC00D118DB /* Release */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | CLANG_ENABLE_OBJC_ARC = YES; 255 | CLANG_WARN_BOOL_CONVERSION = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = YES; 263 | GCC_C_LANGUAGE_STANDARD = gnu99; 264 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 265 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 267 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 268 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 269 | GCC_WARN_UNDECLARED_SELECTOR = YES; 270 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 271 | GCC_WARN_UNUSED_FUNCTION = YES; 272 | GCC_WARN_UNUSED_VARIABLE = YES; 273 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 274 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 275 | SDKROOT = iphoneos; 276 | VALIDATE_PRODUCT = YES; 277 | WARNING_CFLAGS = ( 278 | "-Wall", 279 | "-Wextra", 280 | ); 281 | }; 282 | name = Release; 283 | }; 284 | 01FA7D40145B5FCC00D118DB /* Debug */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 290 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 291 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | WRAPPER_EXTENSION = app; 294 | }; 295 | name = Debug; 296 | }; 297 | 01FA7D41145B5FCC00D118DB /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | CLANG_ENABLE_OBJC_ARC = YES; 301 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 302 | GCC_PREFIX_HEADER = "SwipeViewExample/SwipeViewExample-Prefix.pch"; 303 | INFOPLIST_FILE = "SwipeViewExample/SwipeViewExample-Info.plist"; 304 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | WRAPPER_EXTENSION = app; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | 01FA7D1B145B5FCB00D118DB /* Build configuration list for PBXProject "SwipeViewExample" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 01FA7D3D145B5FCC00D118DB /* Debug */, 317 | 01FA7D3E145B5FCC00D118DB /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | 01FA7D3F145B5FCC00D118DB /* Build configuration list for PBXNativeTarget "SwipeViewExample" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | 01FA7D40145B5FCC00D118DB /* Debug */, 326 | 01FA7D41145B5FCC00D118DB /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = 01FA7D18145B5FCB00D118DB /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @property (strong, nonatomic) ViewController *viewController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | // Override point for customization after application launch. 19 | self.viewController = [[ViewController alloc] init]; 20 | self.window.rootViewController = self.viewController; 21 | [self.window makeKeyAndVisible]; 22 | return YES; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicklockwood/SwipeView/b3d7b667d05325b9c0383e718c05a16240eccf07/Tests/Scroll Test/SwipeViewExample/Default-568h@2x.png -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/SwipeViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.charcoaldesign.${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 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/SwipeViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SwipeViewExample' target in the 'SwipeViewExample' 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 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SwipeView.h" 11 | 12 | 13 | @interface ViewController : UIViewController 14 | 15 | @property (nonatomic, strong) IBOutlet SwipeView *swipeView; 16 | 17 | - (IBAction)scrollToZero; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSMutableArray *colors; 15 | 16 | @end 17 | 18 | 19 | @implementation ViewController 20 | 21 | @synthesize swipeView = _swipeView; 22 | @synthesize colors = _colors; 23 | 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) 28 | { 29 | //set up colors 30 | self.colors = [NSMutableArray array]; 31 | for (int i = 0; i < 10; i++) 32 | { 33 | [self.colors addObject:[UIColor colorWithRed:rand()/(float)RAND_MAX 34 | green:rand()/(float)RAND_MAX 35 | blue:rand()/(float)RAND_MAX 36 | alpha:1.0f]]; 37 | } 38 | } 39 | return self; 40 | } 41 | 42 | - (void)viewDidLoad 43 | { 44 | [super viewDidLoad]; 45 | 46 | //configure swipe view 47 | _swipeView.alignment = SwipeViewAlignmentCenter; 48 | _swipeView.pagingEnabled = NO; 49 | _swipeView.wrapEnabled = NO; 50 | } 51 | 52 | - (BOOL)shouldAutorotateToInterfaceOrientation:(__unused UIInterfaceOrientation)interfaceOrientation 53 | { 54 | return YES; 55 | } 56 | 57 | - (NSInteger)numberOfItemsInSwipeView:(__unused SwipeView *)swipeView 58 | { 59 | return [self.colors count]; 60 | } 61 | 62 | - (UIView *)swipeView:(__unused SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view 63 | { 64 | UILabel *label = (UILabel *)view; 65 | 66 | //create or reuse view 67 | if (view == nil) 68 | { 69 | label = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 300.0f, 100.0f)]; 70 | label.textAlignment = UITextAlignmentCenter; 71 | label.textColor = [UIColor whiteColor]; 72 | view = label; 73 | } 74 | 75 | //configure view 76 | label.backgroundColor = [self.colors objectAtIndex:index]; 77 | label.text = [NSString stringWithFormat:@"%i", index]; 78 | 79 | //return view 80 | return view; 81 | } 82 | 83 | - (IBAction)scrollToZero 84 | { 85 | [_swipeView scrollToItemAtIndex:0 duration:0.5]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1296 5 | 12A269 6 | 2549 7 | 1187 8 | 624.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1498 12 | 13 | 14 | IBProxyObject 15 | IBUIButton 16 | IBUIView 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 274 41 | 42 | {320, 460} 43 | 44 | 45 | 46 | _NS:196 47 | 48 | 3 49 | MCAwAA 50 | 51 | IBCocoaTouchFramework 52 | 53 | 54 | 55 | 269 56 | {{111, 403}, {97, 37}} 57 | 58 | 59 | _NS:9 60 | NO 61 | IBCocoaTouchFramework 62 | 0 63 | 0 64 | 1 65 | Scroll to 0 66 | 67 | 3 68 | MQA 69 | 70 | 71 | 1 72 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 73 | 74 | 75 | 3 76 | MC41AA 77 | 78 | 79 | 2 80 | 15 81 | 82 | 83 | Helvetica-Bold 84 | 15 85 | 16 86 | 87 | 88 | 89 | {{0, 20}, {320, 460}} 90 | 91 | 92 | 93 | 94 | 3 95 | MC43NQA 96 | 97 | 2 98 | 99 | 100 | NO 101 | 102 | IBCocoaTouchFramework 103 | 104 | 105 | 106 | 107 | 108 | 109 | view 110 | 111 | 112 | 113 | 7 114 | 115 | 116 | 117 | swipeView 118 | 119 | 120 | 121 | 11 122 | 123 | 124 | 125 | dataSource 126 | 127 | 128 | 129 | 9 130 | 131 | 132 | 133 | delegate 134 | 135 | 136 | 137 | 10 138 | 139 | 140 | 141 | scrollToZero 142 | 143 | 144 | 7 145 | 146 | 16 147 | 148 | 149 | 150 | 151 | 152 | 0 153 | 154 | 155 | 156 | 157 | 158 | -1 159 | 160 | 161 | File's Owner 162 | 163 | 164 | -2 165 | 166 | 167 | 168 | 169 | 6 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 8 179 | 180 | 181 | 182 | 183 | 184 | 15 185 | 186 | 187 | 188 | 189 | 190 | 191 | ViewController 192 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 193 | UIResponder 194 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 195 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 196 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 197 | SwipeView 198 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 199 | 200 | 201 | 202 | 203 | 204 | 16 205 | 206 | 207 | 208 | 209 | SwipeView 210 | UIView 211 | 212 | id 213 | id 214 | 215 | 216 | 217 | dataSource 218 | id 219 | 220 | 221 | delegate 222 | id 223 | 224 | 225 | 226 | IBProjectSource 227 | ./Classes/SwipeView.h 228 | 229 | 230 | 231 | ViewController 232 | UIViewController 233 | 234 | id 235 | id 236 | 237 | 238 | 239 | pageControlTapped 240 | id 241 | 242 | 243 | scrollToZero 244 | id 245 | 246 | 247 | 248 | UIPageControl 249 | SwipeView 250 | 251 | 252 | 253 | pageControl 254 | UIPageControl 255 | 256 | 257 | swipeView 258 | SwipeView 259 | 260 | 261 | 262 | IBProjectSource 263 | ./Classes/ViewController.h 264 | 265 | 266 | 267 | 268 | 0 269 | IBCocoaTouchFramework 270 | 271 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 272 | 273 | 274 | YES 275 | 3 276 | 1498 277 | 278 | 279 | -------------------------------------------------------------------------------- /Tests/Scroll Test/SwipeViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SwipeViewExample 4 | // 5 | // Created by Nick Lockwood on 28/10/2011. 6 | // Copyright (c) 2011 __MyCompanyName__. 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 | --------------------------------------------------------------------------------