├── .gitignore ├── LICENSE ├── README.md ├── SlidingTableCell.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata └── SlidingTableCell ├── LRSlidingTableViewCell.h ├── LRSlidingTableViewCell.m └── Sample ├── SlidingTableCell-Info.plist ├── SlidingTableCell-Prefix.pch ├── SlidingTableCellAppDelegate.h ├── SlidingTableCellAppDelegate.m ├── SlidingTableCellViewController.h ├── SlidingTableCellViewController.m ├── en.lproj ├── InfoPlist.strings ├── MainWindow.xib └── SlidingTableCellViewController.xib └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | build/ 4 | 5 | *.pbxuser 6 | *.perspective 7 | *.perspectivev3 8 | 9 | *.mode1v3 10 | *.mode2v3 11 | 12 | *.xcodeproj/xcuserdata/*.xcuserdatad 13 | *.xcodeproj/project.xcworkspace/xcuserdata/*.xcuserdatad 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Luke Redpath 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LRSlidingTableViewCell - swipe to reveal implementation 2 | 3 | This is a simple implementation of the "swipe to reveal" behaviour found in Twitter and Spotify for iPhone. 4 | 5 | It uses modern iOS techniques (animations using blocks) and so requires iOS 4.0 or greater. 6 | 7 | The basic premise is that by swiping over a table view cell, the content view is shifted to reveal a background view (which the developer should provide themselves). 8 | 9 | When the table view is scrolled, any swiped cell will close. A subtle "bounce" effect is added when the content view slides back in. 10 | 11 | The LRSlidingTableViewCell class should be re-usable as-is; you just need to provide a background view and a delegate for the cell (typically the table view controller). 12 | 13 | See the provided example controller for an example of how to handle scrolling correctly. 14 | 15 | All code is licensed under the MIT license. Credit to whoever came up with this originally - as far as I know it's Twitter for iPhone (formerly Tweetie) but I don't know this for certain. 16 | -------------------------------------------------------------------------------- /SlidingTableCell.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A3D9A337138EA2D100AFBA90 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D9A336138EA2D100AFBA90 /* UIKit.framework */; }; 11 | A3D9A339138EA2D100AFBA90 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D9A338138EA2D100AFBA90 /* Foundation.framework */; }; 12 | A3D9A33B138EA2D100AFBA90 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D9A33A138EA2D100AFBA90 /* CoreGraphics.framework */; }; 13 | A3D9A341138EA2D100AFBA90 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A3D9A33F138EA2D100AFBA90 /* InfoPlist.strings */; }; 14 | A3D9A344138EA2D100AFBA90 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D9A343138EA2D100AFBA90 /* main.m */; }; 15 | A3D9A347138EA2D100AFBA90 /* SlidingTableCellAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D9A346138EA2D100AFBA90 /* SlidingTableCellAppDelegate.m */; }; 16 | A3D9A34A138EA2D100AFBA90 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3D9A348138EA2D100AFBA90 /* MainWindow.xib */; }; 17 | A3D9A34D138EA2D100AFBA90 /* SlidingTableCellViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D9A34C138EA2D100AFBA90 /* SlidingTableCellViewController.m */; }; 18 | A3D9A350138EA2D100AFBA90 /* SlidingTableCellViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3D9A34E138EA2D100AFBA90 /* SlidingTableCellViewController.xib */; }; 19 | A3D9A358138EA40900AFBA90 /* LRSlidingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D9A357138EA40900AFBA90 /* LRSlidingTableViewCell.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | A3D9A332138EA2D100AFBA90 /* SlidingTableCell.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SlidingTableCell.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | A3D9A336138EA2D100AFBA90 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 25 | A3D9A338138EA2D100AFBA90 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 26 | A3D9A33A138EA2D100AFBA90 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 27 | A3D9A33E138EA2D100AFBA90 /* SlidingTableCell-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SlidingTableCell-Info.plist"; sourceTree = ""; }; 28 | A3D9A340138EA2D100AFBA90 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | A3D9A342138EA2D100AFBA90 /* SlidingTableCell-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SlidingTableCell-Prefix.pch"; sourceTree = ""; }; 30 | A3D9A343138EA2D100AFBA90 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 31 | A3D9A345138EA2D100AFBA90 /* SlidingTableCellAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlidingTableCellAppDelegate.h; sourceTree = ""; }; 32 | A3D9A346138EA2D100AFBA90 /* SlidingTableCellAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SlidingTableCellAppDelegate.m; sourceTree = ""; }; 33 | A3D9A349138EA2D100AFBA90 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; 34 | A3D9A34B138EA2D100AFBA90 /* SlidingTableCellViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlidingTableCellViewController.h; sourceTree = ""; }; 35 | A3D9A34C138EA2D100AFBA90 /* SlidingTableCellViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SlidingTableCellViewController.m; sourceTree = ""; }; 36 | A3D9A34F138EA2D100AFBA90 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SlidingTableCellViewController.xib; sourceTree = ""; }; 37 | A3D9A356138EA40900AFBA90 /* LRSlidingTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LRSlidingTableViewCell.h; sourceTree = ""; }; 38 | A3D9A357138EA40900AFBA90 /* LRSlidingTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LRSlidingTableViewCell.m; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | A3D9A32F138EA2D100AFBA90 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | A3D9A337138EA2D100AFBA90 /* UIKit.framework in Frameworks */, 47 | A3D9A339138EA2D100AFBA90 /* Foundation.framework in Frameworks */, 48 | A3D9A33B138EA2D100AFBA90 /* CoreGraphics.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | A3B5AE601399331100003CB2 /* Sample */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | A3D9A34B138EA2D100AFBA90 /* SlidingTableCellViewController.h */, 59 | A3D9A34C138EA2D100AFBA90 /* SlidingTableCellViewController.m */, 60 | A3D9A34E138EA2D100AFBA90 /* SlidingTableCellViewController.xib */, 61 | A3D9A33D138EA2D100AFBA90 /* Supporting Files */, 62 | A3D9A345138EA2D100AFBA90 /* SlidingTableCellAppDelegate.h */, 63 | A3D9A346138EA2D100AFBA90 /* SlidingTableCellAppDelegate.m */, 64 | A3D9A348138EA2D100AFBA90 /* MainWindow.xib */, 65 | ); 66 | name = Sample; 67 | path = SlidingTableCell/Sample; 68 | sourceTree = SOURCE_ROOT; 69 | }; 70 | A3D9A327138EA2D100AFBA90 = { 71 | isa = PBXGroup; 72 | children = ( 73 | A3D9A33C138EA2D100AFBA90 /* SlidingTableCell */, 74 | A3D9A335138EA2D100AFBA90 /* Frameworks */, 75 | A3D9A333138EA2D100AFBA90 /* Products */, 76 | ); 77 | sourceTree = ""; 78 | }; 79 | A3D9A333138EA2D100AFBA90 /* Products */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | A3D9A332138EA2D100AFBA90 /* SlidingTableCell.app */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | A3D9A335138EA2D100AFBA90 /* Frameworks */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | A3D9A336138EA2D100AFBA90 /* UIKit.framework */, 91 | A3D9A338138EA2D100AFBA90 /* Foundation.framework */, 92 | A3D9A33A138EA2D100AFBA90 /* CoreGraphics.framework */, 93 | ); 94 | name = Frameworks; 95 | sourceTree = ""; 96 | }; 97 | A3D9A33C138EA2D100AFBA90 /* SlidingTableCell */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | A3B5AE601399331100003CB2 /* Sample */, 101 | A3D9A356138EA40900AFBA90 /* LRSlidingTableViewCell.h */, 102 | A3D9A357138EA40900AFBA90 /* LRSlidingTableViewCell.m */, 103 | ); 104 | path = SlidingTableCell; 105 | sourceTree = ""; 106 | }; 107 | A3D9A33D138EA2D100AFBA90 /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | A3D9A33E138EA2D100AFBA90 /* SlidingTableCell-Info.plist */, 111 | A3D9A33F138EA2D100AFBA90 /* InfoPlist.strings */, 112 | A3D9A342138EA2D100AFBA90 /* SlidingTableCell-Prefix.pch */, 113 | A3D9A343138EA2D100AFBA90 /* main.m */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | A3D9A331138EA2D100AFBA90 /* SlidingTableCell */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = A3D9A353138EA2D100AFBA90 /* Build configuration list for PBXNativeTarget "SlidingTableCell" */; 124 | buildPhases = ( 125 | A3D9A32E138EA2D100AFBA90 /* Sources */, 126 | A3D9A32F138EA2D100AFBA90 /* Frameworks */, 127 | A3D9A330138EA2D100AFBA90 /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = SlidingTableCell; 134 | productName = SlidingTableCell; 135 | productReference = A3D9A332138EA2D100AFBA90 /* SlidingTableCell.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | A3D9A329138EA2D100AFBA90 /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | ORGANIZATIONNAME = "LJR Software Limited"; 145 | }; 146 | buildConfigurationList = A3D9A32C138EA2D100AFBA90 /* Build configuration list for PBXProject "SlidingTableCell" */; 147 | compatibilityVersion = "Xcode 3.2"; 148 | developmentRegion = English; 149 | hasScannedForEncodings = 0; 150 | knownRegions = ( 151 | en, 152 | ); 153 | mainGroup = A3D9A327138EA2D100AFBA90; 154 | productRefGroup = A3D9A333138EA2D100AFBA90 /* Products */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | A3D9A331138EA2D100AFBA90 /* SlidingTableCell */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | A3D9A330138EA2D100AFBA90 /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | A3D9A341138EA2D100AFBA90 /* InfoPlist.strings in Resources */, 169 | A3D9A34A138EA2D100AFBA90 /* MainWindow.xib in Resources */, 170 | A3D9A350138EA2D100AFBA90 /* SlidingTableCellViewController.xib in Resources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXResourcesBuildPhase section */ 175 | 176 | /* Begin PBXSourcesBuildPhase section */ 177 | A3D9A32E138EA2D100AFBA90 /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | A3D9A344138EA2D100AFBA90 /* main.m in Sources */, 182 | A3D9A347138EA2D100AFBA90 /* SlidingTableCellAppDelegate.m in Sources */, 183 | A3D9A34D138EA2D100AFBA90 /* SlidingTableCellViewController.m in Sources */, 184 | A3D9A358138EA40900AFBA90 /* LRSlidingTableViewCell.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | A3D9A33F138EA2D100AFBA90 /* InfoPlist.strings */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | A3D9A340138EA2D100AFBA90 /* en */, 195 | ); 196 | name = InfoPlist.strings; 197 | sourceTree = ""; 198 | }; 199 | A3D9A348138EA2D100AFBA90 /* MainWindow.xib */ = { 200 | isa = PBXVariantGroup; 201 | children = ( 202 | A3D9A349138EA2D100AFBA90 /* en */, 203 | ); 204 | name = MainWindow.xib; 205 | sourceTree = ""; 206 | }; 207 | A3D9A34E138EA2D100AFBA90 /* SlidingTableCellViewController.xib */ = { 208 | isa = PBXVariantGroup; 209 | children = ( 210 | A3D9A34F138EA2D100AFBA90 /* en */, 211 | ); 212 | name = SlidingTableCellViewController.xib; 213 | sourceTree = ""; 214 | }; 215 | /* End PBXVariantGroup section */ 216 | 217 | /* Begin XCBuildConfiguration section */ 218 | A3D9A351138EA2D100AFBA90 /* Debug */ = { 219 | isa = XCBuildConfiguration; 220 | buildSettings = { 221 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 222 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_OPTIMIZATION_LEVEL = 0; 225 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 226 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 227 | GCC_VERSION = com.apple.compilers.llvmgcc42; 228 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 229 | GCC_WARN_UNUSED_VARIABLE = YES; 230 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 231 | SDKROOT = iphoneos; 232 | }; 233 | name = Debug; 234 | }; 235 | A3D9A352138EA2D100AFBA90 /* Release */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 239 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 240 | GCC_C_LANGUAGE_STANDARD = gnu99; 241 | GCC_VERSION = com.apple.compilers.llvmgcc42; 242 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 243 | GCC_WARN_UNUSED_VARIABLE = YES; 244 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 245 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 246 | SDKROOT = iphoneos; 247 | }; 248 | name = Release; 249 | }; 250 | A3D9A354138EA2D100AFBA90 /* Debug */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | COPY_PHASE_STRIP = NO; 255 | GCC_DYNAMIC_NO_PIC = NO; 256 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 257 | GCC_PREFIX_HEADER = "SlidingTableCell/Sample/SlidingTableCell-Prefix.pch"; 258 | INFOPLIST_FILE = "SlidingTableCell/Sample/SlidingTableCell-Info.plist"; 259 | PRODUCT_NAME = "$(TARGET_NAME)"; 260 | WRAPPER_EXTENSION = app; 261 | }; 262 | name = Debug; 263 | }; 264 | A3D9A355138EA2D100AFBA90 /* Release */ = { 265 | isa = XCBuildConfiguration; 266 | buildSettings = { 267 | ALWAYS_SEARCH_USER_PATHS = NO; 268 | COPY_PHASE_STRIP = YES; 269 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 270 | GCC_PREFIX_HEADER = "SlidingTableCell/Sample/SlidingTableCell-Prefix.pch"; 271 | INFOPLIST_FILE = "SlidingTableCell/Sample/SlidingTableCell-Info.plist"; 272 | PRODUCT_NAME = "$(TARGET_NAME)"; 273 | VALIDATE_PRODUCT = YES; 274 | WRAPPER_EXTENSION = app; 275 | }; 276 | name = Release; 277 | }; 278 | /* End XCBuildConfiguration section */ 279 | 280 | /* Begin XCConfigurationList section */ 281 | A3D9A32C138EA2D100AFBA90 /* Build configuration list for PBXProject "SlidingTableCell" */ = { 282 | isa = XCConfigurationList; 283 | buildConfigurations = ( 284 | A3D9A351138EA2D100AFBA90 /* Debug */, 285 | A3D9A352138EA2D100AFBA90 /* Release */, 286 | ); 287 | defaultConfigurationIsVisible = 0; 288 | defaultConfigurationName = Release; 289 | }; 290 | A3D9A353138EA2D100AFBA90 /* Build configuration list for PBXNativeTarget "SlidingTableCell" */ = { 291 | isa = XCConfigurationList; 292 | buildConfigurations = ( 293 | A3D9A354138EA2D100AFBA90 /* Debug */, 294 | A3D9A355138EA2D100AFBA90 /* Release */, 295 | ); 296 | defaultConfigurationIsVisible = 0; 297 | defaultConfigurationName = Release; 298 | }; 299 | /* End XCConfigurationList section */ 300 | }; 301 | rootObject = A3D9A329138EA2D100AFBA90 /* Project object */; 302 | } 303 | -------------------------------------------------------------------------------- /SlidingTableCell.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SlidingTableCell/LRSlidingTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCell.h 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class LRSlidingTableViewCell; 12 | 13 | typedef enum { 14 | LRSlidingTableViewCellSwipeDirectionRight = 0, 15 | LRSlidingTableViewCellSwipeDirectionLeft, 16 | LRSlidingTableViewCellSwipeDirectionBoth, 17 | LRSlidingTableViewCellSwipeDirectionNone, 18 | } LRSlidingTableViewCellSwipeDirection; 19 | 20 | @protocol LRSlidingTableViewCellDelegate 21 | - (void)cellDidReceiveSwipe:(LRSlidingTableViewCell *)cell; 22 | @end 23 | 24 | @interface LRSlidingTableViewCell : UITableViewCell { 25 | id delegate; 26 | } 27 | @property (nonatomic, assign) id delegate; 28 | @property (nonatomic, assign) LRSlidingTableViewCellSwipeDirection swipeDirection; 29 | @property (nonatomic, retain) UISwipeGestureRecognizer *lastGestureRecognized; 30 | 31 | /** Slides the content view out to the right to reveal the background view. */ 32 | - (void)slideOutContentView; 33 | 34 | /** Slides the content view back in to cover the background view. */ 35 | - (void)slideInContentView; 36 | @end 37 | -------------------------------------------------------------------------------- /SlidingTableCell/LRSlidingTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCell.m 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import "LRSlidingTableViewCell.h" 10 | 11 | @interface LRSlidingTableViewCell () 12 | - (void)addSwipeGestureRecognizer:(UISwipeGestureRecognizerDirection)direction; 13 | @end 14 | 15 | @implementation LRSlidingTableViewCell 16 | 17 | @synthesize delegate; 18 | @synthesize swipeDirection; 19 | @synthesize lastGestureRecognized; 20 | 21 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 22 | { 23 | if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { 24 | 25 | self.swipeDirection = LRSlidingTableViewCellSwipeDirectionRight; 26 | 27 | /** Add a default empty background view to make it clear that it's all working */ 28 | UIView *defaultBackgroundView = [[UIView alloc] initWithFrame:self.contentView.frame]; 29 | defaultBackgroundView.backgroundColor = [UIColor darkGrayColor]; 30 | self.backgroundView = defaultBackgroundView; 31 | [defaultBackgroundView release]; 32 | } 33 | 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [lastGestureRecognized release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (void)handleSwipe:(UISwipeGestureRecognizer *)gesture 44 | { 45 | [self setLastGestureRecognized:gesture]; 46 | [self slideOutContentView]; 47 | [self.delegate cellDidReceiveSwipe:self]; 48 | } 49 | 50 | - (void)setSwipeDirection:(LRSlidingTableViewCellSwipeDirection)direction 51 | { 52 | swipeDirection = direction; 53 | 54 | NSArray *existingGestures = [self gestureRecognizers]; 55 | for (UIGestureRecognizer *gesture in existingGestures) { 56 | [self removeGestureRecognizer:gesture]; 57 | } 58 | 59 | switch (swipeDirection) { 60 | case LRSlidingTableViewCellSwipeDirectionLeft: 61 | [self addSwipeGestureRecognizer:UISwipeGestureRecognizerDirectionLeft]; 62 | break; 63 | case LRSlidingTableViewCellSwipeDirectionRight: 64 | [self addSwipeGestureRecognizer:UISwipeGestureRecognizerDirectionRight]; 65 | break; 66 | case LRSlidingTableViewCellSwipeDirectionBoth: 67 | [self addSwipeGestureRecognizer:UISwipeGestureRecognizerDirectionLeft]; 68 | [self addSwipeGestureRecognizer:UISwipeGestureRecognizerDirectionRight]; 69 | default: 70 | break; 71 | } 72 | } 73 | 74 | - (void)addSwipeGestureRecognizer:(UISwipeGestureRecognizerDirection)direction; 75 | { 76 | UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; 77 | swipeGesture.direction = direction; 78 | [self addGestureRecognizer:swipeGesture]; 79 | [swipeGesture release]; 80 | } 81 | 82 | 83 | #pragma mark Sliding content view 84 | 85 | #define kBOUNCE_DISTANCE 20.0 86 | 87 | void LR_offsetView(UIView *view, CGFloat offsetX, CGFloat offsetY) 88 | { 89 | view.frame = CGRectOffset(view.frame, offsetX, offsetY); 90 | } 91 | 92 | - (void)slideOutContentView; 93 | { 94 | CGFloat offsetX; 95 | 96 | switch (self.lastGestureRecognized.direction) { 97 | case UISwipeGestureRecognizerDirectionLeft: 98 | offsetX = -self.contentView.frame.size.width; 99 | break; 100 | case UISwipeGestureRecognizerDirectionRight: 101 | offsetX = self.contentView.frame.size.width; 102 | break; 103 | default: 104 | @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Unhandled gesture direction" userInfo:[NSDictionary dictionaryWithObject:self.lastGestureRecognized forKey:@"lastGestureRecognized"]]; 105 | break; 106 | } 107 | 108 | [UIView animateWithDuration:0.2 109 | delay:0 110 | options:UIViewAnimationOptionCurveEaseOut 111 | animations:^{ LR_offsetView(self.contentView, offsetX, 0); } 112 | completion:NULL]; 113 | } 114 | 115 | - (void)slideInContentView; 116 | { 117 | CGFloat offsetX, bounceDistance; 118 | 119 | switch (self.lastGestureRecognized.direction) { 120 | case UISwipeGestureRecognizerDirectionLeft: 121 | offsetX = self.contentView.frame.size.width; 122 | bounceDistance = -kBOUNCE_DISTANCE; 123 | break; 124 | case UISwipeGestureRecognizerDirectionRight: 125 | offsetX = -self.contentView.frame.size.width; 126 | bounceDistance = kBOUNCE_DISTANCE; 127 | break; 128 | default: 129 | @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Unhandled gesture direction" userInfo:[NSDictionary dictionaryWithObject:self.lastGestureRecognized forKey:@"lastGestureRecognized"]]; 130 | break; 131 | } 132 | 133 | [UIView animateWithDuration:0.1 134 | delay:0 135 | options:UIViewAnimationOptionCurveEaseOut|UIViewAnimationOptionAllowUserInteraction 136 | animations:^{ LR_offsetView(self.contentView, offsetX, 0); } 137 | completion:^(BOOL f) { 138 | 139 | [UIView animateWithDuration:0.1 delay:0 140 | options:UIViewAnimationCurveLinear 141 | animations:^{ LR_offsetView(self.contentView, bounceDistance, 0); } 142 | completion:^(BOOL f) { 143 | 144 | [UIView animateWithDuration:0.1 delay:0 145 | options:UIViewAnimationCurveLinear 146 | animations:^{ LR_offsetView(self.contentView, -bounceDistance, 0); } 147 | completion:NULL]; 148 | } 149 | ]; 150 | }]; 151 | } 152 | 153 | @end 154 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCell-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 | co.uk.lukeredpath.${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 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCell-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SlidingTableCell' target in the 'SlidingTableCell' 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 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCellAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCellAppDelegate.h 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class SlidingTableCellViewController; 12 | 13 | @interface SlidingTableCellAppDelegate : NSObject { 14 | 15 | } 16 | 17 | @property (nonatomic, retain) IBOutlet UIWindow *window; 18 | @property (nonatomic, retain) IBOutlet UIViewController *viewController; 19 | @end 20 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCellAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCellAppDelegate.m 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import "SlidingTableCellAppDelegate.h" 10 | 11 | #import "SlidingTableCellViewController.h" 12 | 13 | @implementation SlidingTableCellAppDelegate 14 | 15 | 16 | @synthesize window=_window; 17 | 18 | @synthesize viewController=_viewController; 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 21 | { 22 | // Override point for customization after application launch. 23 | 24 | self.window.rootViewController = self.viewController; 25 | [self.window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application 30 | { 31 | /* 32 | 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. 33 | 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. 34 | */ 35 | } 36 | 37 | - (void)applicationDidEnterBackground:(UIApplication *)application 38 | { 39 | /* 40 | 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. 41 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 42 | */ 43 | } 44 | 45 | - (void)applicationWillEnterForeground:(UIApplication *)application 46 | { 47 | /* 48 | 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. 49 | */ 50 | } 51 | 52 | - (void)applicationDidBecomeActive:(UIApplication *)application 53 | { 54 | /* 55 | 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. 56 | */ 57 | } 58 | 59 | - (void)applicationWillTerminate:(UIApplication *)application 60 | { 61 | /* 62 | Called when the application is about to terminate. 63 | Save data if appropriate. 64 | See also applicationDidEnterBackground:. 65 | */ 66 | } 67 | 68 | - (void)dealloc 69 | { 70 | [_window release]; 71 | [_viewController release]; 72 | [super dealloc]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCellViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCellViewController.h 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LRSlidingTableViewCell.h" 11 | 12 | @interface SlidingTableCellViewController : UITableViewController { 13 | } 14 | @property (nonatomic, retain) LRSlidingTableViewCell *currentlyActiveSlidingCell; 15 | @property (nonatomic, retain) IBOutlet UISegmentedControl *swipeDirectionSegmentedControl; 16 | @property (nonatomic, assign) LRSlidingTableViewCellSwipeDirection swipeDirection; 17 | 18 | - (IBAction)handleSegmentedControlSelection:(id)sender; 19 | @end 20 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/SlidingTableCellViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingTableCellViewController.m 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import "SlidingTableCellViewController.h" 10 | 11 | @implementation SlidingTableCellViewController 12 | 13 | @synthesize currentlyActiveSlidingCell; 14 | @synthesize swipeDirectionSegmentedControl; 15 | @synthesize swipeDirection; 16 | 17 | - (void)dealloc 18 | { 19 | [currentlyActiveSlidingCell release]; 20 | [super dealloc]; 21 | } 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | 27 | self.navigationItem.prompt = @"Use the toolbar to change swipe direction"; 28 | 29 | UIBarItem *controlItem = [[UIBarButtonItem alloc] initWithCustomView:self.swipeDirectionSegmentedControl]; 30 | [self setToolbarItems:[NSArray arrayWithObject:controlItem]]; 31 | [controlItem release]; 32 | } 33 | 34 | - (IBAction)handleSegmentedControlSelection:(UISegmentedControl *)sender; 35 | { 36 | self.swipeDirection = (LRSlidingTableViewCellSwipeDirection)sender.selectedSegmentIndex; 37 | self.currentlyActiveSlidingCell = nil; 38 | 39 | [self.tableView reloadData]; 40 | } 41 | 42 | #pragma mark - 43 | 44 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 45 | { 46 | return 60.0; 47 | } 48 | 49 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 50 | { 51 | return 30; 52 | } 53 | 54 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 55 | { 56 | static NSString *identifier = @"CELL_IDENTIFIER"; 57 | 58 | LRSlidingTableViewCell *cell = (LRSlidingTableViewCell *)[tableView dequeueReusableCellWithIdentifier:identifier]; 59 | 60 | if (cell == nil) { 61 | cell = [[[LRSlidingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier] autorelease]; 62 | } 63 | 64 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 65 | cell.contentView.backgroundColor = [UIColor whiteColor]; 66 | cell.textLabel.text = [NSString stringWithFormat:@"Cell %d", indexPath.row]; 67 | cell.swipeDirection = self.swipeDirection; 68 | cell.delegate = self; 69 | 70 | return cell; 71 | } 72 | 73 | /** Store a reference to the cell that has been swiped. 74 | * 75 | * This allows us to slide the cell's content back in again if the user 76 | * starts dragging the table view or swipes a different cell. 77 | */ 78 | - (void)cellDidReceiveSwipe:(LRSlidingTableViewCell *)cell 79 | { 80 | self.currentlyActiveSlidingCell = cell; 81 | } 82 | 83 | /** Any swiped cell should be reset when we start to scroll. */ 84 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView 85 | { 86 | self.currentlyActiveSlidingCell = nil; 87 | } 88 | 89 | /** Whenever the current active sliding cell changes (or is set to nil) 90 | * the existing one should be reset by calling it's slideInContentView method. */ 91 | - (void)setCurrentlyActiveSlidingCell:(LRSlidingTableViewCell *)cell 92 | { 93 | [currentlyActiveSlidingCell slideInContentView]; 94 | [currentlyActiveSlidingCell autorelease]; 95 | currentlyActiveSlidingCell = [cell retain]; 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/en.lproj/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10J869 6 | 1306 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 301 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUINavigationController 17 | IBUIViewController 18 | IBUICustomObject 19 | IBUIToolbar 20 | IBUIWindow 21 | IBUINavigationBar 22 | IBUINavigationItem 23 | 24 | 25 | YES 26 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 27 | 28 | 29 | YES 30 | 31 | YES 32 | 33 | 34 | 35 | 36 | YES 37 | 38 | IBFilesOwner 39 | IBCocoaTouchFramework 40 | 41 | 42 | IBFirstResponder 43 | IBCocoaTouchFramework 44 | 45 | 46 | IBCocoaTouchFramework 47 | 48 | 49 | 50 | 292 51 | {320, 480} 52 | 53 | 1 54 | MSAxIDEAA 55 | 56 | NO 57 | NO 58 | 59 | IBCocoaTouchFramework 60 | YES 61 | 62 | 63 | 64 | 65 | 1 66 | 1 67 | 68 | IBCocoaTouchFramework 69 | NO 70 | 71 | 72 | 256 73 | {0, 0} 74 | NO 75 | YES 76 | YES 77 | IBCocoaTouchFramework 78 | 79 | 80 | 81 | 256 82 | {{0, 416}, {320, 44}} 83 | NO 84 | YES 85 | 4 86 | YES 87 | IBCocoaTouchFramework 88 | 89 | 90 | YES 91 | 92 | 93 | 94 | Sliding Table Cells 95 | IBCocoaTouchFramework 96 | 97 | 98 | SlidingTableCellViewController 99 | 100 | 101 | 1 102 | 1 103 | 104 | IBCocoaTouchFramework 105 | NO 106 | 107 | 108 | NO 109 | 110 | 111 | 112 | 113 | YES 114 | 115 | 116 | delegate 117 | 118 | 119 | 120 | 4 121 | 122 | 123 | 124 | window 125 | 126 | 127 | 128 | 14 129 | 130 | 131 | 132 | viewController 133 | 134 | 135 | 136 | 21 137 | 138 | 139 | 140 | 141 | YES 142 | 143 | 0 144 | 145 | 146 | 147 | 148 | 149 | -1 150 | 151 | 152 | File's Owner 153 | 154 | 155 | 3 156 | 157 | 158 | SlidingTableCell App Delegate 159 | 160 | 161 | -2 162 | 163 | 164 | 165 | 166 | 12 167 | 168 | 169 | 170 | 171 | 16 172 | 173 | 174 | YES 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 17 183 | 184 | 185 | 186 | 187 | 10 188 | 189 | 190 | YES 191 | 192 | 193 | 194 | 195 | 196 | 20 197 | 198 | 199 | 200 | 201 | 22 202 | 203 | 204 | 205 | 206 | 207 | 208 | YES 209 | 210 | YES 211 | -1.CustomClassName 212 | -2.CustomClassName 213 | 10.CustomClassName 214 | 10.IBEditorWindowLastContentRect 215 | 10.IBPluginDependency 216 | 12.IBEditorWindowLastContentRect 217 | 12.IBPluginDependency 218 | 16.IBPluginDependency 219 | 17.IBPluginDependency 220 | 3.CustomClassName 221 | 3.IBPluginDependency 222 | 223 | 224 | YES 225 | UIApplication 226 | UIResponder 227 | SlidingTableCellViewController 228 | {{234, 376}, {320, 480}} 229 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 230 | {{525, 346}, {320, 480}} 231 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 232 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 233 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 234 | SlidingTableCellAppDelegate 235 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 236 | 237 | 238 | 239 | YES 240 | 241 | 242 | 243 | 244 | 245 | YES 246 | 247 | 248 | 249 | 250 | 22 251 | 252 | 253 | 254 | YES 255 | 256 | SlidingTableCellAppDelegate 257 | NSObject 258 | 259 | YES 260 | 261 | YES 262 | viewController 263 | window 264 | 265 | 266 | YES 267 | UIViewController 268 | UIWindow 269 | 270 | 271 | 272 | YES 273 | 274 | YES 275 | viewController 276 | window 277 | 278 | 279 | YES 280 | 281 | viewController 282 | UIViewController 283 | 284 | 285 | window 286 | UIWindow 287 | 288 | 289 | 290 | 291 | IBProjectSource 292 | ./Classes/SlidingTableCellAppDelegate.h 293 | 294 | 295 | 296 | SlidingTableCellViewController 297 | UITableViewController 298 | 299 | swipeDirectionSegmentedControl 300 | UISegmentedControl 301 | 302 | 303 | swipeDirectionSegmentedControl 304 | 305 | swipeDirectionSegmentedControl 306 | UISegmentedControl 307 | 308 | 309 | 310 | IBProjectSource 311 | ./Classes/SlidingTableCellViewController.h 312 | 313 | 314 | 315 | 316 | 0 317 | IBCocoaTouchFramework 318 | 319 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 320 | 321 | 322 | 323 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 324 | 325 | 326 | YES 327 | 3 328 | 301 329 | 330 | 331 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/en.lproj/SlidingTableCellViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J869 6 | 1306 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 301 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUISegmentedControl 17 | IBUITableView 18 | 19 | 20 | YES 21 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 22 | 23 | 24 | YES 25 | 26 | YES 27 | 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | {{0, 20}, {320, 460}} 44 | 45 | 46 | 47 | 3 48 | MQA 49 | 50 | YES 51 | 52 | IBCocoaTouchFramework 53 | YES 54 | 1 55 | 0 56 | YES 57 | 44 58 | 22 59 | 22 60 | 61 | 62 | 63 | 292 64 | {308, 30} 65 | 66 | 67 | NO 68 | IBCocoaTouchFramework 69 | 2 70 | 4 71 | 0 72 | 73 | YES 74 | Right 75 | Left 76 | Both 77 | None 78 | 79 | 80 | YES 81 | 82 | 83 | 84 | 85 | 86 | 87 | YES 88 | 89 | 90 | 91 | 92 | 93 | 94 | YES 95 | {0, 0} 96 | {0, 0} 97 | {0, 0} 98 | {0, 0} 99 | 100 | 101 | YES 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | YES 112 | 113 | 114 | delegate 115 | 116 | 117 | 118 | 9 119 | 120 | 121 | 122 | dataSource 123 | 124 | 125 | 126 | 10 127 | 128 | 129 | 130 | view 131 | 132 | 133 | 134 | 11 135 | 136 | 137 | 138 | swipeDirectionSegmentedControl 139 | 140 | 141 | 142 | 13 143 | 144 | 145 | 146 | handleSegmentedControlSelection: 147 | 148 | 149 | 13 150 | 151 | 14 152 | 153 | 154 | 155 | 156 | YES 157 | 158 | 0 159 | 160 | 161 | 162 | 163 | 164 | -1 165 | 166 | 167 | File's Owner 168 | 169 | 170 | -2 171 | 172 | 173 | 174 | 175 | 8 176 | 177 | 178 | 179 | 180 | 12 181 | 182 | 183 | 184 | 185 | 186 | 187 | YES 188 | 189 | YES 190 | -1.CustomClassName 191 | -2.CustomClassName 192 | 12.IBPluginDependency 193 | 8.IBPluginDependency 194 | 195 | 196 | YES 197 | SlidingTableCellViewController 198 | UIResponder 199 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 200 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 201 | 202 | 203 | 204 | YES 205 | 206 | 207 | 208 | 209 | 210 | YES 211 | 212 | 213 | 214 | 215 | 14 216 | 217 | 218 | 219 | YES 220 | 221 | SlidingTableCellViewController 222 | UITableViewController 223 | 224 | handleSegmentedControlSelection: 225 | id 226 | 227 | 228 | handleSegmentedControlSelection: 229 | 230 | handleSegmentedControlSelection: 231 | id 232 | 233 | 234 | 235 | swipeDirectionSegmentedControl 236 | UISegmentedControl 237 | 238 | 239 | swipeDirectionSegmentedControl 240 | 241 | swipeDirectionSegmentedControl 242 | UISegmentedControl 243 | 244 | 245 | 246 | IBProjectSource 247 | ./Classes/SlidingTableCellViewController.h 248 | 249 | 250 | 251 | 252 | 0 253 | IBCocoaTouchFramework 254 | 255 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 256 | 257 | 258 | YES 259 | 3 260 | 301 261 | 262 | 263 | -------------------------------------------------------------------------------- /SlidingTableCell/Sample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SlidingTableCell 4 | // 5 | // Created by Luke Redpath on 26/05/2011. 6 | // Copyright 2011 LJR Software Limited. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | --------------------------------------------------------------------------------