├── .swift-version ├── .travis.yml ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Example.xcscheme └── RKParallaxEffect │ ├── AppDelegate.swift │ ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── apple.imageset │ │ ├── Contents.json │ │ └── apple.jpg │ ├── Info.plist │ └── TableViewController.swift ├── LICENSE ├── README.md ├── RKParallaxEffect.gif ├── RKParallaxEffect.podspec ├── RKParallaxEffect.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── RKParallaxEffect.xcscheme ├── RKParallaxEffect.xcworkspace └── contents.xcworkspacedata └── Sources ├── Info.plist ├── RKParallaxEffect.h └── RKParallaxEffect.swift /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8 3 | 4 | git: 5 | submodules: false 6 | 7 | env: 8 | global: 9 | - LC_CTYPE=en_US.UTF-8 10 | - LANG=en_US.UTF-8 11 | - WORKSPACE=RKParallaxEffect.xcworkspace 12 | - IOS_FRAMEWORK_SCHEME="RKParallaxEffect" 13 | - IOS_SDK=iphonesimulator10.0 14 | - EXAMPLE_SCHEME="Example" 15 | 16 | matrix: 17 | - DESTINATION="OS=10.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" BUILD_EXAMPLE="YES" RELEASE_READY="YES" POD_LINT="YES" 18 | - DESTINATION="OS=9.0,name=iPhone 6s" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" BUILD_EXAMPLE="YES" RELEASE_READY="NO" POD_LINT="NO" 19 | - DESTINATION="OS=8.1,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" BUILD_EXAMPLE="YES" RELEASE_READY="NO" POD_LINT="NO" 20 | 21 | 22 | before_install: 23 | - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet 24 | - brew update 25 | - brew outdated carthage || brew upgrade carthage 26 | 27 | script: 28 | - set -o pipefail 29 | - xcodebuild -version 30 | - xcodebuild -showsdks 31 | 32 | # Build Framework in Debug and Run Tests if specified 33 | - if [ $RUN_TESTS == "YES" ]; then 34 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c; 35 | else 36 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; 37 | fi 38 | 39 | # Build Framework in Release and Run Tests if specified 40 | - if [ $RUN_TESTS == "YES" ]; then 41 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c; 42 | else 43 | xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c; 44 | fi 45 | 46 | # Build Example in Debug if specified 47 | - if [ $BUILD_EXAMPLE == "YES" ]; then 48 | xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c; 49 | fi 50 | 51 | # Run `pod lib lint` if specified 52 | - if [ $POD_LINT == "YES" ]; then 53 | pod lib lint; 54 | fi 55 | 56 | before_deploy: 57 | - carthage build --no-skip-current 58 | - carthage archive RKParallaxEffect 59 | 60 | deploy: 61 | - provider: releases 62 | api_key: 63 | secure: KrjeFZFxA8KFpVpZuPpHzjhJREYmOprCR072mGzEJtuf/J9Auiqqml9EEbx0jtabpajkfbDRdWVjkSG+czc13QhBT4uBRCnPiX3c2t1m1PnaZEkiPTyY17ZFIC0+cyxwpQ1KPludHEy5cJ1JS98C6vzprxhSO1p4IDOBMbZ/AmeD8i+iHIGagvdyZdI0ksPuofm9qlg7aQgAvmz+XivlIEtnp9WuDFH0X62Pg2W2M5fJ2IuMTQXAou5Me+/T2TdorGWnASN+7oemYxBHeF1SCkxxvgZ1zh6RDKWaOhBd7+Sim6Aa6KiDpwkIFHtDFw6GVbmpJOp71Ic6PjEOncbXlTvOc+urLcGwUdeGaGOTuyNjKfmrJcvUHUH3E0cvwFvGqXG1C0A8RUIYjRM+RkenxCcEOZPVhYBeZUdS6uHk1ncnQ6r6QTKP0pmbO0uGlhQ4hWUF03u0psAQfQRAYgNsiZPpP/V8Myc0nLrsHK46E+L/CVbuqg82KtcQT2CfYCV4nmG2a3ii/FXaOLJIe0CZqV0uadfXNTYazjdcXXf48OpimNv0hCoaI+od2lMu88Mb08Ff430dNx3k7T5NlWyPLezkT7OfO2dC4MaXkSdS869+G3JKg6mutBLKTAkVuEUMlDqcGSSKFream+D2AVsNKYPWW68XqzzSF6FXrNA8SqA= 64 | file: 65 | - RKParallaxEffect.framework.zip 66 | skip_cleanup: true 67 | overwrite: true 68 | on: 69 | repo: RahulKatariya/RKParallaxEffect 70 | tags: true 71 | condition: $RELEASE_READY = YES 72 | - provider: script 73 | script: pod trunk push 74 | on: 75 | repo: RahulKatariya/RKParallaxEffect 76 | tags: true 77 | condition: $RELEASE_READY = YES 78 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3503754C1A7F4CD500E0D7BE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3503754B1A7F4CD500E0D7BE /* AppDelegate.swift */; }; 11 | 350375511A7F4CD500E0D7BE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3503754F1A7F4CD500E0D7BE /* Main.storyboard */; }; 12 | 350375531A7F4CD500E0D7BE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 350375521A7F4CD500E0D7BE /* Images.xcassets */; }; 13 | 350375561A7F4CD500E0D7BE /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 350375541A7F4CD500E0D7BE /* LaunchScreen.xib */; }; 14 | 356366681A7F80B400D9354E /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356366671A7F80B400D9354E /* TableViewController.swift */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXContainerItemProxy section */ 18 | 352D98AD1D9C312F007BC704 /* PBXContainerItemProxy */ = { 19 | isa = PBXContainerItemProxy; 20 | containerPortal = 352D98A91D9C312F007BC704 /* RKParallaxEffect.xcodeproj */; 21 | proxyType = 2; 22 | remoteGlobalIDString = 35DEA9181C5CCE2400BA22CE; 23 | remoteInfo = RKParallaxEffect; 24 | }; 25 | 354AA8AF1D9CE22B0069B30E /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 352D98A91D9C312F007BC704 /* RKParallaxEffect.xcodeproj */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 35DEA9171C5CCE2400BA22CE; 30 | remoteInfo = RKParallaxEffect; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXCopyFilesBuildPhase section */ 35 | 352D98A71D9C305B007BC704 /* Embed Frameworks */ = { 36 | isa = PBXCopyFilesBuildPhase; 37 | buildActionMask = 2147483647; 38 | dstPath = ""; 39 | dstSubfolderSpec = 10; 40 | files = ( 41 | ); 42 | name = "Embed Frameworks"; 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXCopyFilesBuildPhase section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 350375461A7F4CD500E0D7BE /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 3503754A1A7F4CD500E0D7BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 3503754B1A7F4CD500E0D7BE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 51 | 350375501A7F4CD500E0D7BE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 350375521A7F4CD500E0D7BE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 53 | 350375551A7F4CD500E0D7BE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 54 | 352D98A91D9C312F007BC704 /* RKParallaxEffect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RKParallaxEffect.xcodeproj; path = ../RKParallaxEffect.xcodeproj; sourceTree = ""; }; 55 | 356366671A7F80B400D9354E /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 350375431A7F4CD500E0D7BE /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 3503753D1A7F4CD500E0D7BE = { 70 | isa = PBXGroup; 71 | children = ( 72 | 350375481A7F4CD500E0D7BE /* Example */, 73 | 352D989A1D9C3035007BC704 /* Frameworks */, 74 | 350375471A7F4CD500E0D7BE /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 350375471A7F4CD500E0D7BE /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 350375461A7F4CD500E0D7BE /* Example.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 350375481A7F4CD500E0D7BE /* Example */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 3503754B1A7F4CD500E0D7BE /* AppDelegate.swift */, 90 | 3503754F1A7F4CD500E0D7BE /* Main.storyboard */, 91 | 356366671A7F80B400D9354E /* TableViewController.swift */, 92 | 350375521A7F4CD500E0D7BE /* Images.xcassets */, 93 | 350375541A7F4CD500E0D7BE /* LaunchScreen.xib */, 94 | 350375491A7F4CD500E0D7BE /* Supporting Files */, 95 | ); 96 | name = Example; 97 | path = RKParallaxEffect; 98 | sourceTree = ""; 99 | }; 100 | 350375491A7F4CD500E0D7BE /* Supporting Files */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 3503754A1A7F4CD500E0D7BE /* Info.plist */, 104 | ); 105 | name = "Supporting Files"; 106 | sourceTree = ""; 107 | }; 108 | 352D989A1D9C3035007BC704 /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 352D98A91D9C312F007BC704 /* RKParallaxEffect.xcodeproj */, 112 | ); 113 | name = Frameworks; 114 | sourceTree = ""; 115 | }; 116 | 352D98AA1D9C312F007BC704 /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 352D98AE1D9C312F007BC704 /* RKParallaxEffect.framework */, 120 | ); 121 | name = Products; 122 | sourceTree = ""; 123 | }; 124 | /* End PBXGroup section */ 125 | 126 | /* Begin PBXNativeTarget section */ 127 | 350375451A7F4CD500E0D7BE /* Example */ = { 128 | isa = PBXNativeTarget; 129 | buildConfigurationList = 350375651A7F4CD600E0D7BE /* Build configuration list for PBXNativeTarget "Example" */; 130 | buildPhases = ( 131 | 350375421A7F4CD500E0D7BE /* Sources */, 132 | 350375431A7F4CD500E0D7BE /* Frameworks */, 133 | 350375441A7F4CD500E0D7BE /* Resources */, 134 | 352D98A71D9C305B007BC704 /* Embed Frameworks */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | 354AA8B01D9CE22B0069B30E /* PBXTargetDependency */, 140 | ); 141 | name = Example; 142 | productName = RKParallaxEffect; 143 | productReference = 350375461A7F4CD500E0D7BE /* Example.app */; 144 | productType = "com.apple.product-type.application"; 145 | }; 146 | /* End PBXNativeTarget section */ 147 | 148 | /* Begin PBXProject section */ 149 | 3503753E1A7F4CD500E0D7BE /* Project object */ = { 150 | isa = PBXProject; 151 | attributes = { 152 | LastSwiftMigration = 0720; 153 | LastSwiftUpdateCheck = 0720; 154 | LastUpgradeCheck = 0800; 155 | ORGANIZATIONNAME = "Rahul Katariya"; 156 | TargetAttributes = { 157 | 350375451A7F4CD500E0D7BE = { 158 | CreatedOnToolsVersion = 6.1.1; 159 | LastSwiftMigration = 0800; 160 | }; 161 | }; 162 | }; 163 | buildConfigurationList = 350375411A7F4CD500E0D7BE /* Build configuration list for PBXProject "Example" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = English; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | Base, 170 | ); 171 | mainGroup = 3503753D1A7F4CD500E0D7BE; 172 | productRefGroup = 350375471A7F4CD500E0D7BE /* Products */; 173 | projectDirPath = ""; 174 | projectReferences = ( 175 | { 176 | ProductGroup = 352D98AA1D9C312F007BC704 /* Products */; 177 | ProjectRef = 352D98A91D9C312F007BC704 /* RKParallaxEffect.xcodeproj */; 178 | }, 179 | ); 180 | projectRoot = ""; 181 | targets = ( 182 | 350375451A7F4CD500E0D7BE /* Example */, 183 | ); 184 | }; 185 | /* End PBXProject section */ 186 | 187 | /* Begin PBXReferenceProxy section */ 188 | 352D98AE1D9C312F007BC704 /* RKParallaxEffect.framework */ = { 189 | isa = PBXReferenceProxy; 190 | fileType = wrapper.framework; 191 | path = RKParallaxEffect.framework; 192 | remoteRef = 352D98AD1D9C312F007BC704 /* PBXContainerItemProxy */; 193 | sourceTree = BUILT_PRODUCTS_DIR; 194 | }; 195 | /* End PBXReferenceProxy section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 350375441A7F4CD500E0D7BE /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 350375511A7F4CD500E0D7BE /* Main.storyboard in Resources */, 203 | 350375561A7F4CD500E0D7BE /* LaunchScreen.xib in Resources */, 204 | 350375531A7F4CD500E0D7BE /* Images.xcassets in Resources */, 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | /* End PBXResourcesBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 350375421A7F4CD500E0D7BE /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 3503754C1A7F4CD500E0D7BE /* AppDelegate.swift in Sources */, 216 | 356366681A7F80B400D9354E /* TableViewController.swift in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXTargetDependency section */ 223 | 354AA8B01D9CE22B0069B30E /* PBXTargetDependency */ = { 224 | isa = PBXTargetDependency; 225 | name = RKParallaxEffect; 226 | targetProxy = 354AA8AF1D9CE22B0069B30E /* PBXContainerItemProxy */; 227 | }; 228 | /* End PBXTargetDependency section */ 229 | 230 | /* Begin PBXVariantGroup section */ 231 | 3503754F1A7F4CD500E0D7BE /* Main.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 350375501A7F4CD500E0D7BE /* Base */, 235 | ); 236 | name = Main.storyboard; 237 | sourceTree = ""; 238 | }; 239 | 350375541A7F4CD500E0D7BE /* LaunchScreen.xib */ = { 240 | isa = PBXVariantGroup; 241 | children = ( 242 | 350375551A7F4CD500E0D7BE /* Base */, 243 | ); 244 | name = LaunchScreen.xib; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXVariantGroup section */ 248 | 249 | /* Begin XCBuildConfiguration section */ 250 | 350375631A7F4CD600E0D7BE /* Debug */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 255 | CLANG_CXX_LIBRARY = "libc++"; 256 | CLANG_ENABLE_MODULES = YES; 257 | CLANG_ENABLE_OBJC_ARC = YES; 258 | CLANG_WARN_BOOL_CONVERSION = YES; 259 | CLANG_WARN_CONSTANT_CONVERSION = YES; 260 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 261 | CLANG_WARN_EMPTY_BODY = YES; 262 | CLANG_WARN_ENUM_CONVERSION = YES; 263 | CLANG_WARN_INFINITE_RECURSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 267 | CLANG_WARN_UNREACHABLE_CODE = YES; 268 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 269 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 270 | COPY_PHASE_STRIP = NO; 271 | ENABLE_STRICT_OBJC_MSGSEND = YES; 272 | ENABLE_TESTABILITY = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu99; 274 | GCC_DYNAMIC_NO_PIC = NO; 275 | GCC_NO_COMMON_BLOCKS = YES; 276 | GCC_OPTIMIZATION_LEVEL = 0; 277 | GCC_PREPROCESSOR_DEFINITIONS = ( 278 | "DEBUG=1", 279 | "$(inherited)", 280 | ); 281 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 284 | GCC_WARN_UNDECLARED_SELECTOR = YES; 285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 286 | GCC_WARN_UNUSED_FUNCTION = YES; 287 | GCC_WARN_UNUSED_VARIABLE = YES; 288 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 289 | MTL_ENABLE_DEBUG_INFO = YES; 290 | ONLY_ACTIVE_ARCH = YES; 291 | SDKROOT = iphoneos; 292 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 293 | TARGETED_DEVICE_FAMILY = "1,2"; 294 | }; 295 | name = Debug; 296 | }; 297 | 350375641A7F4CD600E0D7BE /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 302 | CLANG_CXX_LIBRARY = "libc++"; 303 | CLANG_ENABLE_MODULES = YES; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_CONSTANT_CONVERSION = YES; 307 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 308 | CLANG_WARN_EMPTY_BODY = YES; 309 | CLANG_WARN_ENUM_CONVERSION = YES; 310 | CLANG_WARN_INFINITE_RECURSION = YES; 311 | CLANG_WARN_INT_CONVERSION = YES; 312 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 313 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 314 | CLANG_WARN_UNREACHABLE_CODE = YES; 315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 316 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 317 | COPY_PHASE_STRIP = YES; 318 | ENABLE_NS_ASSERTIONS = NO; 319 | ENABLE_STRICT_OBJC_MSGSEND = YES; 320 | GCC_C_LANGUAGE_STANDARD = gnu99; 321 | GCC_NO_COMMON_BLOCKS = YES; 322 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 323 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 324 | GCC_WARN_UNDECLARED_SELECTOR = YES; 325 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 326 | GCC_WARN_UNUSED_FUNCTION = YES; 327 | GCC_WARN_UNUSED_VARIABLE = YES; 328 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 329 | MTL_ENABLE_DEBUG_INFO = NO; 330 | SDKROOT = iphoneos; 331 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 332 | TARGETED_DEVICE_FAMILY = "1,2"; 333 | VALIDATE_PRODUCT = YES; 334 | }; 335 | name = Release; 336 | }; 337 | 350375661A7F4CD600E0D7BE /* Debug */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 341 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 342 | INFOPLIST_FILE = RKParallaxEffect/Info.plist; 343 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 344 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 345 | PRODUCT_BUNDLE_IDENTIFIER = "com.rahulkatariya.$(PRODUCT_NAME:rfc1034identifier)"; 346 | PRODUCT_NAME = Example; 347 | SWIFT_VERSION = 3.0; 348 | }; 349 | name = Debug; 350 | }; 351 | 350375671A7F4CD600E0D7BE /* Release */ = { 352 | isa = XCBuildConfiguration; 353 | buildSettings = { 354 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | INFOPLIST_FILE = RKParallaxEffect/Info.plist; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 359 | PRODUCT_BUNDLE_IDENTIFIER = "com.rahulkatariya.$(PRODUCT_NAME:rfc1034identifier)"; 360 | PRODUCT_NAME = Example; 361 | SWIFT_VERSION = 3.0; 362 | }; 363 | name = Release; 364 | }; 365 | /* End XCBuildConfiguration section */ 366 | 367 | /* Begin XCConfigurationList section */ 368 | 350375411A7F4CD500E0D7BE /* Build configuration list for PBXProject "Example" */ = { 369 | isa = XCConfigurationList; 370 | buildConfigurations = ( 371 | 350375631A7F4CD600E0D7BE /* Debug */, 372 | 350375641A7F4CD600E0D7BE /* Release */, 373 | ); 374 | defaultConfigurationIsVisible = 0; 375 | defaultConfigurationName = Release; 376 | }; 377 | 350375651A7F4CD600E0D7BE /* Build configuration list for PBXNativeTarget "Example" */ = { 378 | isa = XCConfigurationList; 379 | buildConfigurations = ( 380 | 350375661A7F4CD600E0D7BE /* Debug */, 381 | 350375671A7F4CD600E0D7BE /* Release */, 382 | ); 383 | defaultConfigurationIsVisible = 0; 384 | defaultConfigurationName = Release; 385 | }; 386 | /* End XCConfigurationList section */ 387 | }; 388 | rootObject = 3503753E1A7F4CD500E0D7BE /* Project object */; 389 | } 390 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Example/RKParallaxEffect/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RKParallaxEffect 4 | // 5 | // Created by Rahul Katariya on 02/02/15. 6 | // Copyright (c) 2015 Rahul Katariya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Images.xcassets/apple.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "apple.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Images.xcassets/apple.imageset/apple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahul0x24/RKParallaxEffect/e18eaf9ca42a491fd4e4bf3ac551540e6659a74d/Example/RKParallaxEffect/Images.xcassets/apple.imageset/apple.jpg -------------------------------------------------------------------------------- /Example/RKParallaxEffect/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/RKParallaxEffect/TableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.swift 3 | // RKParallaxEffect 4 | // 5 | // Created by Rahul Katariya on 02/02/15. 6 | // Copyright (c) 2015 Rahul Katariya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RKParallaxEffect 11 | 12 | class TableViewController: UITableViewController { 13 | 14 | var parallaxEffect: RKParallaxEffect! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | // Uncomment the following line to preserve selection between presentations 19 | // self.clearsSelectionOnViewWillAppear = false 20 | 21 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 22 | // self.navigationItem.rightBarButtonItem = self.editButtonItem() 23 | 24 | } 25 | 26 | override func viewDidAppear(_ animated: Bool) { 27 | super.viewDidAppear(animated) 28 | parallaxEffect = RKParallaxEffect(tableView: tableView) 29 | parallaxEffect.isParallaxEffectEnabled = true 30 | parallaxEffect.isFullScreenTapGestureRecognizerEnabled = true 31 | parallaxEffect.isFullScreenPanGestureRecognizerEnabled = true 32 | } 33 | 34 | override func didReceiveMemoryWarning() { 35 | super.didReceiveMemoryWarning() 36 | // Dispose of any resources that can be recreated. 37 | } 38 | 39 | // MARK: - Table view data source 40 | 41 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 42 | // #warning Incomplete method implementation. 43 | // Return the number of rows in the section. 44 | return 20 45 | } 46 | 47 | 48 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 49 | let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as UITableViewCell 50 | 51 | // Configure the cell... 52 | cell.textLabel?.text = "Row \(indexPath.row)" 53 | return cell 54 | } 55 | 56 | /* 57 | // Override to support conditional editing of the table view. 58 | override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { 59 | // Return NO if you do not want the specified item to be editable. 60 | return true 61 | } 62 | */ 63 | 64 | /* 65 | // Override to support editing the table view. 66 | override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { 67 | if editingStyle == .Delete { 68 | // Delete the row from the data source 69 | tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) 70 | } else if editingStyle == .Insert { 71 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 72 | } 73 | } 74 | */ 75 | 76 | /* 77 | // Override to support rearranging the table view. 78 | override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { 79 | 80 | } 81 | */ 82 | 83 | /* 84 | // Override to support conditional rearranging of the table view. 85 | override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { 86 | // Return NO if you do not want the item to be re-orderable. 87 | return true 88 | } 89 | */ 90 | 91 | /* 92 | // MARK: - Navigation 93 | 94 | // In a storyboard-based application, you will often want to do a little preparation before navigation 95 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 96 | // Get the new view controller using [segue destinationViewController]. 97 | // Pass the selected object to the new view controller. 98 | } 99 | */ 100 | 101 | } 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2016 Rahul Katariya 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RKParallaxEffect 2 | 3 | [![Travis](https://img.shields.io/travis/RahulKatariya/RKParallaxEffect/master.svg)](https://travis-ci.org/RahulKatariya/RKParallaxEffect/branches) 4 | [![Version](https://img.shields.io/cocoapods/v/RKParallaxEffect.svg?style=flat)](http://cocoadocs.org/docsets/RKParallaxEffect) 5 | [![License](https://img.shields.io/cocoapods/l/RKParallaxEffect.svg?style=flat)](http://cocoadocs.org/docsets/RKParallaxEffect) 6 | [![Platform](https://img.shields.io/cocoapods/p/RKParallaxEffect.svg?style=flat)](http://cocoadocs.org/docsets/RKParallaxEffect) 7 | 8 | [![Preview](https://raw.githubusercontent.com/RahulKatariya/RKParallaxEffect/master/RKParallaxEffect.gif)](http://RahulKatariya.github.io/RKParallaxEffect) 9 | 10 | ## Requirements 11 | 12 | * iOS 8.0+ 13 | * Xcode 8.0+ 14 | 15 | ## Installation 16 | 17 | ### CocoaPods 18 | 19 | RKParallaxEffect is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: 20 | 21 | use_frameworks! 22 | pod "RKParallaxEffect", ~> '2.0' 23 | 24 | 25 | ### Carthage 26 | 27 | github "RahulKatariya/RKParallaxEffect" ~> 2.0 28 | 29 | ## Usage 30 | ```swift 31 | import RKParallaxEffect 32 | 33 | class TableViewController: UITableViewController { 34 | 35 | var parallaxEffect: RKParallaxEffect! 36 | 37 | override func viewDidLoad() { 38 | super.viewDidLoad() 39 | parallaxEffect = RKParallaxEffect(tableView: tableView) 40 | } 41 | 42 | override func viewDidAppear(animated: Bool) { 43 | super.viewDidAppear(animated) 44 | parallaxEffect.isParallaxEffectEnabled = true 45 | parallaxEffect.isFullScreenTapGestureRecognizerEnabled = true 46 | parallaxEffect.isFullScreenPanGestureRecognizerEnabled = true 47 | } 48 | 49 | } 50 | 51 | ``` 52 | 53 | ## Author 54 | 55 | Rahul Katariya, rahulkatariya@me.com 56 | 57 | ## License 58 | 59 | RKParallaxEffect is available under the MIT license. See the LICENSE file for more info. 60 | -------------------------------------------------------------------------------- /RKParallaxEffect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahul0x24/RKParallaxEffect/e18eaf9ca42a491fd4e4bf3ac551540e6659a74d/RKParallaxEffect.gif -------------------------------------------------------------------------------- /RKParallaxEffect.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "RKParallaxEffect" 3 | s.version = "3.0.0" 4 | s.summary = "RKParallaxEffect is written in Swift and provides API to create a parallax effect on UITableHeaderView" 5 | s.homepage = "https://rahulkatariya.github.io/RKParallaxEffect" 6 | s.license = { :type => "MIT", :file => "LICENSE" } 7 | s.author = { "Rahul Katariya" => "rahulkatariya@me.com" } 8 | s.source = { :git => "https://github.com/RahulKatariya/RKParallaxEffect.git", :tag => s.version.to_s } 9 | s.social_media_url = 'https://twitter.com/rahulkatariya91' 10 | s.platform = :ios 11 | s.ios.deployment_target = '8.0' 12 | s.requires_arc = true 13 | s.source_files = 'Sources/*.swift' 14 | end 15 | -------------------------------------------------------------------------------- /RKParallaxEffect.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 352D98B51D9C3142007BC704 /* RKParallaxEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 352D98B21D9C3142007BC704 /* RKParallaxEffect.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 352D98B61D9C3142007BC704 /* RKParallaxEffect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 352D98B31D9C3142007BC704 /* RKParallaxEffect.swift */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 352D98B11D9C3142007BC704 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 16 | 352D98B21D9C3142007BC704 /* RKParallaxEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKParallaxEffect.h; sourceTree = ""; }; 17 | 352D98B31D9C3142007BC704 /* RKParallaxEffect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RKParallaxEffect.swift; sourceTree = ""; }; 18 | 35DEA9181C5CCE2400BA22CE /* RKParallaxEffect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RKParallaxEffect.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 35DEA9141C5CCE2400BA22CE /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | 352D98B01D9C3142007BC704 /* Sources */ = { 33 | isa = PBXGroup; 34 | children = ( 35 | 352D98B21D9C3142007BC704 /* RKParallaxEffect.h */, 36 | 352D98B31D9C3142007BC704 /* RKParallaxEffect.swift */, 37 | 352D98B11D9C3142007BC704 /* Info.plist */, 38 | ); 39 | path = Sources; 40 | sourceTree = ""; 41 | }; 42 | 35DEA90E1C5CCE2400BA22CE = { 43 | isa = PBXGroup; 44 | children = ( 45 | 352D98B01D9C3142007BC704 /* Sources */, 46 | 35DEA9191C5CCE2400BA22CE /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 35DEA9191C5CCE2400BA22CE /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 35DEA9181C5CCE2400BA22CE /* RKParallaxEffect.framework */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | /* End PBXGroup section */ 59 | 60 | /* Begin PBXHeadersBuildPhase section */ 61 | 35DEA9151C5CCE2400BA22CE /* Headers */ = { 62 | isa = PBXHeadersBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 352D98B51D9C3142007BC704 /* RKParallaxEffect.h in Headers */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXHeadersBuildPhase section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 35DEA9171C5CCE2400BA22CE /* RKParallaxEffect */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = 35DEA9201C5CCE2400BA22CE /* Build configuration list for PBXNativeTarget "RKParallaxEffect" */; 75 | buildPhases = ( 76 | 35DEA9131C5CCE2400BA22CE /* Sources */, 77 | 35DEA9141C5CCE2400BA22CE /* Frameworks */, 78 | 35DEA9151C5CCE2400BA22CE /* Headers */, 79 | 35DEA9161C5CCE2400BA22CE /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = RKParallaxEffect; 86 | productName = RKParallaxEffect; 87 | productReference = 35DEA9181C5CCE2400BA22CE /* RKParallaxEffect.framework */; 88 | productType = "com.apple.product-type.framework"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | 35DEA90F1C5CCE2400BA22CE /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastUpgradeCheck = 0800; 97 | ORGANIZATIONNAME = "Rahul Katariya"; 98 | TargetAttributes = { 99 | 35DEA9171C5CCE2400BA22CE = { 100 | CreatedOnToolsVersion = 7.2; 101 | LastSwiftMigration = 0900; 102 | }; 103 | }; 104 | }; 105 | buildConfigurationList = 35DEA9121C5CCE2400BA22CE /* Build configuration list for PBXProject "RKParallaxEffect" */; 106 | compatibilityVersion = "Xcode 3.2"; 107 | developmentRegion = English; 108 | hasScannedForEncodings = 0; 109 | knownRegions = ( 110 | en, 111 | ); 112 | mainGroup = 35DEA90E1C5CCE2400BA22CE; 113 | productRefGroup = 35DEA9191C5CCE2400BA22CE /* Products */; 114 | projectDirPath = ""; 115 | projectRoot = ""; 116 | targets = ( 117 | 35DEA9171C5CCE2400BA22CE /* RKParallaxEffect */, 118 | ); 119 | }; 120 | /* End PBXProject section */ 121 | 122 | /* Begin PBXResourcesBuildPhase section */ 123 | 35DEA9161C5CCE2400BA22CE /* Resources */ = { 124 | isa = PBXResourcesBuildPhase; 125 | buildActionMask = 2147483647; 126 | files = ( 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXResourcesBuildPhase section */ 131 | 132 | /* Begin PBXSourcesBuildPhase section */ 133 | 35DEA9131C5CCE2400BA22CE /* Sources */ = { 134 | isa = PBXSourcesBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | 352D98B61D9C3142007BC704 /* RKParallaxEffect.swift in Sources */, 138 | ); 139 | runOnlyForDeploymentPostprocessing = 0; 140 | }; 141 | /* End PBXSourcesBuildPhase section */ 142 | 143 | /* Begin XCBuildConfiguration section */ 144 | 35DEA91E1C5CCE2400BA22CE /* Debug */ = { 145 | isa = XCBuildConfiguration; 146 | buildSettings = { 147 | ALWAYS_SEARCH_USER_PATHS = NO; 148 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 149 | CLANG_CXX_LIBRARY = "libc++"; 150 | CLANG_ENABLE_MODULES = YES; 151 | CLANG_ENABLE_OBJC_ARC = YES; 152 | CLANG_WARN_BOOL_CONVERSION = YES; 153 | CLANG_WARN_CONSTANT_CONVERSION = YES; 154 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 155 | CLANG_WARN_EMPTY_BODY = YES; 156 | CLANG_WARN_ENUM_CONVERSION = YES; 157 | CLANG_WARN_INFINITE_RECURSION = YES; 158 | CLANG_WARN_INT_CONVERSION = YES; 159 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 160 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 161 | CLANG_WARN_UNREACHABLE_CODE = YES; 162 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 163 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 164 | COPY_PHASE_STRIP = NO; 165 | CURRENT_PROJECT_VERSION = 1; 166 | DEBUG_INFORMATION_FORMAT = dwarf; 167 | ENABLE_STRICT_OBJC_MSGSEND = YES; 168 | ENABLE_TESTABILITY = YES; 169 | GCC_C_LANGUAGE_STANDARD = gnu99; 170 | GCC_DYNAMIC_NO_PIC = NO; 171 | GCC_NO_COMMON_BLOCKS = YES; 172 | GCC_OPTIMIZATION_LEVEL = 0; 173 | GCC_PREPROCESSOR_DEFINITIONS = ( 174 | "DEBUG=1", 175 | "$(inherited)", 176 | ); 177 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 178 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 179 | GCC_WARN_UNDECLARED_SELECTOR = YES; 180 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 181 | GCC_WARN_UNUSED_FUNCTION = YES; 182 | GCC_WARN_UNUSED_VARIABLE = YES; 183 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 184 | MTL_ENABLE_DEBUG_INFO = YES; 185 | ONLY_ACTIVE_ARCH = YES; 186 | SDKROOT = iphoneos; 187 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 188 | TARGETED_DEVICE_FAMILY = "1,2"; 189 | VERSIONING_SYSTEM = "apple-generic"; 190 | VERSION_INFO_PREFIX = ""; 191 | }; 192 | name = Debug; 193 | }; 194 | 35DEA91F1C5CCE2400BA22CE /* Release */ = { 195 | isa = XCBuildConfiguration; 196 | buildSettings = { 197 | ALWAYS_SEARCH_USER_PATHS = NO; 198 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 199 | CLANG_CXX_LIBRARY = "libc++"; 200 | CLANG_ENABLE_MODULES = YES; 201 | CLANG_ENABLE_OBJC_ARC = YES; 202 | CLANG_WARN_BOOL_CONVERSION = YES; 203 | CLANG_WARN_CONSTANT_CONVERSION = YES; 204 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 205 | CLANG_WARN_EMPTY_BODY = YES; 206 | CLANG_WARN_ENUM_CONVERSION = YES; 207 | CLANG_WARN_INFINITE_RECURSION = YES; 208 | CLANG_WARN_INT_CONVERSION = YES; 209 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 210 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 211 | CLANG_WARN_UNREACHABLE_CODE = YES; 212 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 213 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 214 | COPY_PHASE_STRIP = NO; 215 | CURRENT_PROJECT_VERSION = 1; 216 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 217 | ENABLE_NS_ASSERTIONS = NO; 218 | ENABLE_STRICT_OBJC_MSGSEND = YES; 219 | GCC_C_LANGUAGE_STANDARD = gnu99; 220 | GCC_NO_COMMON_BLOCKS = YES; 221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 223 | GCC_WARN_UNDECLARED_SELECTOR = YES; 224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 225 | GCC_WARN_UNUSED_FUNCTION = YES; 226 | GCC_WARN_UNUSED_VARIABLE = YES; 227 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 228 | MTL_ENABLE_DEBUG_INFO = NO; 229 | SDKROOT = iphoneos; 230 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 231 | TARGETED_DEVICE_FAMILY = "1,2"; 232 | VALIDATE_PRODUCT = YES; 233 | VERSIONING_SYSTEM = "apple-generic"; 234 | VERSION_INFO_PREFIX = ""; 235 | }; 236 | name = Release; 237 | }; 238 | 35DEA9211C5CCE2400BA22CE /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | CLANG_ENABLE_MODULES = YES; 242 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 243 | DEFINES_MODULE = YES; 244 | DYLIB_COMPATIBILITY_VERSION = 1; 245 | DYLIB_CURRENT_VERSION = 1; 246 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 247 | INFOPLIST_FILE = Sources/Info.plist; 248 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 249 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 250 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 251 | PRODUCT_BUNDLE_IDENTIFIER = com.rahulkatariya.RKParallaxEffect; 252 | PRODUCT_NAME = "$(TARGET_NAME)"; 253 | SKIP_INSTALL = YES; 254 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 255 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 256 | SWIFT_VERSION = 4.0; 257 | }; 258 | name = Debug; 259 | }; 260 | 35DEA9221C5CCE2400BA22CE /* Release */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | CLANG_ENABLE_MODULES = YES; 264 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 265 | DEFINES_MODULE = YES; 266 | DYLIB_COMPATIBILITY_VERSION = 1; 267 | DYLIB_CURRENT_VERSION = 1; 268 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 269 | INFOPLIST_FILE = Sources/Info.plist; 270 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 271 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 272 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 273 | PRODUCT_BUNDLE_IDENTIFIER = com.rahulkatariya.RKParallaxEffect; 274 | PRODUCT_NAME = "$(TARGET_NAME)"; 275 | SKIP_INSTALL = YES; 276 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 277 | SWIFT_VERSION = 4.0; 278 | }; 279 | name = Release; 280 | }; 281 | /* End XCBuildConfiguration section */ 282 | 283 | /* Begin XCConfigurationList section */ 284 | 35DEA9121C5CCE2400BA22CE /* Build configuration list for PBXProject "RKParallaxEffect" */ = { 285 | isa = XCConfigurationList; 286 | buildConfigurations = ( 287 | 35DEA91E1C5CCE2400BA22CE /* Debug */, 288 | 35DEA91F1C5CCE2400BA22CE /* Release */, 289 | ); 290 | defaultConfigurationIsVisible = 0; 291 | defaultConfigurationName = Release; 292 | }; 293 | 35DEA9201C5CCE2400BA22CE /* Build configuration list for PBXNativeTarget "RKParallaxEffect" */ = { 294 | isa = XCConfigurationList; 295 | buildConfigurations = ( 296 | 35DEA9211C5CCE2400BA22CE /* Debug */, 297 | 35DEA9221C5CCE2400BA22CE /* Release */, 298 | ); 299 | defaultConfigurationIsVisible = 0; 300 | defaultConfigurationName = Release; 301 | }; 302 | /* End XCConfigurationList section */ 303 | }; 304 | rootObject = 35DEA90F1C5CCE2400BA22CE /* Project object */; 305 | } 306 | -------------------------------------------------------------------------------- /RKParallaxEffect.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RKParallaxEffect.xcodeproj/xcshareddata/xcschemes/RKParallaxEffect.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /RKParallaxEffect.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Sources/RKParallaxEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // RKParallaxEffect.h 3 | // RKParallaxEffect 4 | // 5 | // Created by Rahul Katariya on 30/01/16. 6 | // Copyright © 2016 Rahul Katariya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for RKParallaxEffect. 12 | FOUNDATION_EXPORT double RKParallaxEffectVersionNumber; 13 | 14 | //! Project version string for RKParallaxEffect. 15 | FOUNDATION_EXPORT const unsigned char RKParallaxEffectVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/RKParallaxEffect.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RKParallaxEffect.swift 3 | // RKParallaxEffect 4 | // 5 | // Created by Rahul Katariya on 02/02/15. 6 | // Copyright (c) 2015 Rahul Katariya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class RKParallaxEffect: NSObject { 12 | 13 | var tableView: UITableView! 14 | var tableHeaderView: UIView? 15 | var tableViewTopInset: CGFloat = 0 16 | 17 | open var isParallaxEffectEnabled: Bool = false { 18 | didSet { 19 | if isParallaxEffectEnabled { 20 | self.setupTableHeaderView() 21 | self.addObservers() 22 | } 23 | } 24 | } 25 | 26 | //FullScreen Tap 27 | var tableHeaderViewIntitalFrame:CGRect! 28 | var isFullScreenModeEnabled = false 29 | var isAnimating = false 30 | var isFullScreen = false 31 | var initialContentSize: CGSize! 32 | 33 | open var isFullScreenTapGestureRecognizerEnabled: Bool = false { 34 | didSet { 35 | if isFullScreenTapGestureRecognizerEnabled { 36 | if !isFullScreenModeEnabled { 37 | isFullScreenModeEnabled = true 38 | } 39 | tableHeaderView?.isUserInteractionEnabled = true 40 | tableHeaderView?.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(RKParallaxEffect.handleTap(_:)))) 41 | } 42 | } 43 | } 44 | 45 | deinit { 46 | removeObservers() 47 | } 48 | 49 | var newFrame: CGRect { 50 | get { 51 | if isFullScreen { 52 | return tableHeaderViewIntitalFrame 53 | } else { 54 | return CGRect(x: tableView.frame.origin.x, y: -(tableView.frame.size.height-tableViewTopInset), width: tableView.frame.size.width, height: tableView.frame.size.height-tableViewTopInset) 55 | } 56 | } 57 | } 58 | 59 | //FullScreen Pan 60 | open var thresholdValue: CGFloat = 100.0 61 | 62 | open var isFullScreenPanGestureRecognizerEnabled: Bool = false { 63 | didSet { 64 | if isFullScreenPanGestureRecognizerEnabled { 65 | if !isFullScreenModeEnabled { 66 | isFullScreenModeEnabled = true 67 | } 68 | if !isParallaxEffectEnabled { 69 | isParallaxEffectEnabled = true 70 | } 71 | tableHeaderView?.isUserInteractionEnabled = true 72 | } 73 | } 74 | } 75 | 76 | public init(tableView:UITableView) { 77 | self.tableView = tableView 78 | self.tableHeaderView = tableView.tableHeaderView 79 | super.init() 80 | } 81 | 82 | func setupTableHeaderView() { 83 | if let thv = tableHeaderView { 84 | tableView.tableHeaderView = tableView.tableHeaderView 85 | tableView.tableHeaderView = nil 86 | tableView.addSubview(thv) 87 | 88 | thv.clipsToBounds = true 89 | 90 | var frame = thv.frame 91 | frame.origin.y = -(thv.frame.size.height) 92 | thv.frame = frame 93 | tableHeaderViewIntitalFrame = frame 94 | 95 | setupTableView() 96 | } 97 | } 98 | 99 | func setupTableView() { 100 | 101 | tableViewTopInset = tableView.contentInset.top 102 | 103 | var contentInset = tableView.contentInset 104 | contentInset.top = tableViewTopInset + tableHeaderViewIntitalFrame.size.height 105 | tableView.contentInset = contentInset 106 | 107 | tableView.setContentOffset(CGPoint(x: tableView.contentOffset.x, y: -(tableHeaderViewIntitalFrame.size.height+tableViewTopInset)), animated:false) 108 | 109 | } 110 | 111 | func addObservers() { 112 | tableView.addObserver(self, forKeyPath: "contentOffset", options: .new, context: nil) 113 | tableHeaderView?.addObserver(self, forKeyPath: "frame", options: .new, context: nil) 114 | } 115 | 116 | func removeObservers() { 117 | tableView.removeObserver(self, forKeyPath: "contentOffset") 118 | tableHeaderView?.removeObserver(self, forKeyPath: "frame") 119 | } 120 | 121 | open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { 122 | if keyPath == "contentOffset" { 123 | adjustParallaxEffectOnTableHeaderViewWithContentOffset((change![NSKeyValueChangeKey.newKey]! as AnyObject).cgPointValue) 124 | } else if keyPath == "frame" { 125 | tableView.layoutIfNeeded() 126 | } 127 | } 128 | 129 | func adjustParallaxEffectOnTableHeaderViewWithContentOffset(_ contentOffset:CGPoint) { 130 | if let thv = tableHeaderView { 131 | let yOffset = -1*(contentOffset.y+tableViewTopInset) 132 | if yOffset > 0 { 133 | if isParallaxEffectEnabled { 134 | thv.frame = CGRect(x: 0, y: -yOffset, width: thv.frame.width, height: yOffset) 135 | } 136 | if isFullScreenModeEnabled && !isAnimating { 137 | if isFullScreenPanGestureRecognizerEnabled { 138 | if !isFullScreen && yOffset > tableHeaderViewIntitalFrame.size.height + thresholdValue { 139 | tableView.isScrollEnabled = false 140 | var frame = tableHeaderViewIntitalFrame 141 | frame?.size.height = yOffset 142 | thv.frame = frame! 143 | tableView.layoutIfNeeded() 144 | enterFullScreen() 145 | } else if isFullScreen && yOffset < tableView.frame.size.height-tableViewTopInset-thresholdValue { 146 | tableView.isScrollEnabled = false 147 | var frame = CGRect(x: tableView.frame.origin.x, y: -(tableView.frame.size.height-tableViewTopInset), width: tableView.frame.size.width, height: tableView.frame.size.height-tableViewTopInset) 148 | frame.size.height -= thresholdValue 149 | thv.frame = frame 150 | tableView.layoutIfNeeded() 151 | exitFullScreen() 152 | } 153 | } 154 | } 155 | } 156 | } 157 | } 158 | 159 | func enterFullScreen() { 160 | if !isFullScreen { 161 | handleTap(nil) 162 | } 163 | } 164 | 165 | func exitFullScreen() { 166 | if isFullScreen { 167 | handleTap(nil) 168 | } 169 | } 170 | 171 | @objc func handleTap(_ sender:AnyObject?) { 172 | self.willChangeFullScreenMode() 173 | UIView.animate(withDuration: 0.3, delay: 0, options: [.beginFromCurrentState, .beginFromCurrentState], animations: { () -> Void in 174 | self.adjustTableViewContentInset() 175 | self.tableHeaderView!.frame = self.newFrame 176 | }) { (completed: Bool) -> Void in 177 | self.didChangeFullScreenMode() 178 | } 179 | } 180 | 181 | 182 | func adjustTableViewContentInset() { 183 | //Adjust ContentOffset 184 | tableView.setContentOffset(CGPoint(x: tableView.contentOffset.x,y: -(self.newFrame.size.height+self.tableViewTopInset)), animated: false) 185 | 186 | //Adjust ContentInset 187 | var contentInset = tableView.contentInset 188 | contentInset.top = newFrame.size.height+tableViewTopInset 189 | tableView.contentInset = contentInset 190 | } 191 | 192 | func willChangeFullScreenMode() { 193 | isAnimating = true 194 | if isFullScreen { 195 | 196 | } else { 197 | initialContentSize = tableView.contentSize 198 | } 199 | } 200 | 201 | func didChangeFullScreenMode() { 202 | isFullScreen = !isFullScreen 203 | isAnimating = false 204 | tableView.isScrollEnabled = true 205 | if isFullScreen { 206 | tableView.contentSize = CGSize(width: initialContentSize.width, height: 0) 207 | } else { 208 | tableView.contentSize = initialContentSize 209 | } 210 | } 211 | 212 | } 213 | --------------------------------------------------------------------------------