├── .github ├── animation1.gif ├── animation2.gif ├── banner.png └── thumbnail.png ├── .gitignore ├── .swift-version ├── CHANGELOG.md ├── Example ├── LPThumbnailViewExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── LPThumbnailViewExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── LPThumbnailViewExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── ExampleImg.imageset │ │ │ ├── Contents.json │ │ │ └── Screen Shot 2017-12-08 at 11.29.56 PM.png │ │ └── ExampleImg2.imageset │ │ │ ├── Contents.json │ │ │ └── Screen Shot 2017-12-09 at 1.27.13 PM.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock └── Pods │ ├── Local Podspecs │ └── LPThumbnailView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── LPThumbnailView │ ├── Info.plist │ ├── LPThumbnailView-dummy.m │ ├── LPThumbnailView-prefix.pch │ ├── LPThumbnailView-umbrella.h │ ├── LPThumbnailView.modulemap │ └── LPThumbnailView.xcconfig │ └── Pods-LPThumbnailViewExample │ ├── Info.plist │ ├── Pods-LPThumbnailViewExample-acknowledgements.markdown │ ├── Pods-LPThumbnailViewExample-acknowledgements.plist │ ├── Pods-LPThumbnailViewExample-dummy.m │ ├── Pods-LPThumbnailViewExample-frameworks.sh │ ├── Pods-LPThumbnailViewExample-resources.sh │ ├── Pods-LPThumbnailViewExample-umbrella.h │ ├── Pods-LPThumbnailViewExample.debug.xcconfig │ ├── Pods-LPThumbnailViewExample.modulemap │ └── Pods-LPThumbnailViewExample.release.xcconfig ├── LICENSE ├── LPThumbnailView.podspec ├── README.md ├── docs ├── Classes.html ├── Classes │ └── LPThumbnailView.html ├── Enums.html ├── Enums │ └── LPThumbnailViewAnimationStyle.html ├── Protocols.html ├── Protocols │ └── LPThumbnailViewDelegate.html ├── badge.svg ├── css │ ├── highlight.css │ └── jazzy.css ├── docsets │ ├── LPThumbnailView.docset │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── Documents │ │ │ ├── Classes.html │ │ │ ├── Classes │ │ │ │ └── LPThumbnailView.html │ │ │ ├── Enums.html │ │ │ ├── Enums │ │ │ │ └── LPThumbnailViewAnimationStyle.html │ │ │ ├── Protocols.html │ │ │ ├── Protocols │ │ │ │ └── LPThumbnailViewDelegate.html │ │ │ ├── css │ │ │ │ ├── highlight.css │ │ │ │ └── jazzy.css │ │ │ ├── img │ │ │ │ ├── carat.png │ │ │ │ ├── dash.png │ │ │ │ └── gh.png │ │ │ ├── index.html │ │ │ ├── js │ │ │ │ ├── jazzy.js │ │ │ │ └── jquery.min.js │ │ │ └── search.json │ │ │ └── docSet.dsidx │ └── LPThumbnailView.tgz ├── img │ ├── carat.png │ ├── dash.png │ └── gh.png ├── index.html ├── js │ ├── jazzy.js │ └── jquery.min.js ├── search.json └── undocumented.json ├── run-jazzy.sh └── src ├── LPThumbnailView.framework.zip ├── LPThumbnailView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── LPThumbnailView.xcscheme ├── LPThumbnailView ├── Info.plist ├── LPShadowImageView.swift ├── LPShadowView.swift ├── LPThumbnailCounterView.swift ├── LPThumbnailView.h ├── LPThumbnailView.swift ├── LPThumbnailViewAnimationStyle.swift └── LPThumbnailViewDelegate.swift └── LPThumbnailViewTests ├── Info.plist └── LPThumbnailViewTests.swift /.github/animation1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/.github/animation1.gif -------------------------------------------------------------------------------- /.github/animation2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/.github/animation2.gif -------------------------------------------------------------------------------- /.github/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/.github/banner.png -------------------------------------------------------------------------------- /.github/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/.github/thumbnail.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | 4 | ## Build generated 5 | build/ 6 | DerivedData/ 7 | 8 | ## Various settings 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata/ 18 | 19 | ## Other 20 | *.moved-aside 21 | *.xccheckout 22 | *.xcscmblueprint 23 | .DS_Store 24 | 25 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.1 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Version 1.1.2 2 | 3 | - Build with Swift 4.1 4 | 5 | ## Version 1.1.1 6 | 7 | - Fix bug with `deleteAtIndex` 8 | 9 | ## Version 1.1.0 10 | 11 | - Add tap listener for the view and animation on tap 12 | - Add helper class `LPShadowView` to easily animate shadows in views. 13 | - Both `LPShadowImageView` and `LPCounterView` now derive from `LPShadowView` 14 | - Add animations for on touch events 15 | - Increase requirement to iOS 10.0 since using `UIViewPropretyAnimator` 16 | - Add missing documentation and new docs for 17 | - Add new `LPThumbnailViewDelegate` to allow user to listen for taps in view and action on them. 18 | 19 | ## Version 1.0.0 20 | 21 | Initial release 22 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 488EC0C4F2A045D0CA74B010 /* Pods_LPThumbnailViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A60A93535F83C4197F923368 /* Pods_LPThumbnailViewExample.framework */; }; 11 | A08B8B941FDF934000EBF8BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08B8B931FDF934000EBF8BD /* AppDelegate.swift */; }; 12 | A08B8B961FDF934000EBF8BD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08B8B951FDF934000EBF8BD /* ViewController.swift */; }; 13 | A08B8B991FDF934000EBF8BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A08B8B971FDF934000EBF8BD /* Main.storyboard */; }; 14 | A08B8B9B1FDF934000EBF8BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A08B8B9A1FDF934000EBF8BD /* Assets.xcassets */; }; 15 | A08B8B9E1FDF934000EBF8BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A08B8B9C1FDF934000EBF8BD /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 5CB4B2925E542F362FC7D07E /* Pods-LPThumbnailViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LPThumbnailViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample.release.xcconfig"; sourceTree = ""; }; 20 | 7489F2E4EA37864455510C50 /* Pods-LPThumbnailViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LPThumbnailViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample.debug.xcconfig"; sourceTree = ""; }; 21 | A08B8B901FDF934000EBF8BD /* LPThumbnailViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LPThumbnailViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | A08B8B931FDF934000EBF8BD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | A08B8B951FDF934000EBF8BD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 24 | A08B8B981FDF934000EBF8BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | A08B8B9A1FDF934000EBF8BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | A08B8B9D1FDF934000EBF8BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27 | A08B8B9F1FDF934000EBF8BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | A60A93535F83C4197F923368 /* Pods_LPThumbnailViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LPThumbnailViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | A08B8B8D1FDF934000EBF8BD /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 488EC0C4F2A045D0CA74B010 /* Pods_LPThumbnailViewExample.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 6A162189C0CB99BF3752008E /* Frameworks */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | A60A93535F83C4197F923368 /* Pods_LPThumbnailViewExample.framework */, 47 | ); 48 | name = Frameworks; 49 | sourceTree = ""; 50 | }; 51 | A08B8B871FDF934000EBF8BD = { 52 | isa = PBXGroup; 53 | children = ( 54 | A08B8B921FDF934000EBF8BD /* LPThumbnailViewExample */, 55 | A08B8B911FDF934000EBF8BD /* Products */, 56 | E956E3972D1589150DFD8179 /* Pods */, 57 | 6A162189C0CB99BF3752008E /* Frameworks */, 58 | ); 59 | sourceTree = ""; 60 | }; 61 | A08B8B911FDF934000EBF8BD /* Products */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | A08B8B901FDF934000EBF8BD /* LPThumbnailViewExample.app */, 65 | ); 66 | name = Products; 67 | sourceTree = ""; 68 | }; 69 | A08B8B921FDF934000EBF8BD /* LPThumbnailViewExample */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | A08B8B931FDF934000EBF8BD /* AppDelegate.swift */, 73 | A08B8B951FDF934000EBF8BD /* ViewController.swift */, 74 | A08B8B971FDF934000EBF8BD /* Main.storyboard */, 75 | A08B8B9A1FDF934000EBF8BD /* Assets.xcassets */, 76 | A08B8B9C1FDF934000EBF8BD /* LaunchScreen.storyboard */, 77 | A08B8B9F1FDF934000EBF8BD /* Info.plist */, 78 | ); 79 | path = LPThumbnailViewExample; 80 | sourceTree = ""; 81 | }; 82 | E956E3972D1589150DFD8179 /* Pods */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 7489F2E4EA37864455510C50 /* Pods-LPThumbnailViewExample.debug.xcconfig */, 86 | 5CB4B2925E542F362FC7D07E /* Pods-LPThumbnailViewExample.release.xcconfig */, 87 | ); 88 | name = Pods; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | A08B8B8F1FDF934000EBF8BD /* LPThumbnailViewExample */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = A08B8BA21FDF934000EBF8BD /* Build configuration list for PBXNativeTarget "LPThumbnailViewExample" */; 97 | buildPhases = ( 98 | B30CC98F389D79D62FB04F20 /* [CP] Check Pods Manifest.lock */, 99 | A08B8B8C1FDF934000EBF8BD /* Sources */, 100 | A08B8B8D1FDF934000EBF8BD /* Frameworks */, 101 | A08B8B8E1FDF934000EBF8BD /* Resources */, 102 | 942D7119F0ED3D2BC8CB84CE /* [CP] Embed Pods Frameworks */, 103 | ); 104 | buildRules = ( 105 | ); 106 | dependencies = ( 107 | ); 108 | name = LPThumbnailViewExample; 109 | productName = LPThumbnailViewExample; 110 | productReference = A08B8B901FDF934000EBF8BD /* LPThumbnailViewExample.app */; 111 | productType = "com.apple.product-type.application"; 112 | }; 113 | /* End PBXNativeTarget section */ 114 | 115 | /* Begin PBXProject section */ 116 | A08B8B881FDF934000EBF8BD /* Project object */ = { 117 | isa = PBXProject; 118 | attributes = { 119 | LastSwiftUpdateCheck = 0920; 120 | LastUpgradeCheck = 1010; 121 | ORGANIZATIONNAME = "Luis Padron"; 122 | TargetAttributes = { 123 | A08B8B8F1FDF934000EBF8BD = { 124 | CreatedOnToolsVersion = 9.2; 125 | LastSwiftMigration = 1010; 126 | ProvisioningStyle = Automatic; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = A08B8B8B1FDF934000EBF8BD /* Build configuration list for PBXProject "LPThumbnailViewExample" */; 131 | compatibilityVersion = "Xcode 8.0"; 132 | developmentRegion = en; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = A08B8B871FDF934000EBF8BD; 139 | productRefGroup = A08B8B911FDF934000EBF8BD /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | A08B8B8F1FDF934000EBF8BD /* LPThumbnailViewExample */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | A08B8B8E1FDF934000EBF8BD /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | A08B8B9E1FDF934000EBF8BD /* LaunchScreen.storyboard in Resources */, 154 | A08B8B9B1FDF934000EBF8BD /* Assets.xcassets in Resources */, 155 | A08B8B991FDF934000EBF8BD /* Main.storyboard in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXShellScriptBuildPhase section */ 162 | 942D7119F0ED3D2BC8CB84CE /* [CP] Embed Pods Frameworks */ = { 163 | isa = PBXShellScriptBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | inputFileListPaths = ( 168 | ); 169 | inputPaths = ( 170 | "${SRCROOT}/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-frameworks.sh", 171 | "${BUILT_PRODUCTS_DIR}/LPThumbnailView/LPThumbnailView.framework", 172 | ); 173 | name = "[CP] Embed Pods Frameworks"; 174 | outputFileListPaths = ( 175 | ); 176 | outputPaths = ( 177 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LPThumbnailView.framework", 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | shellPath = /bin/sh; 181 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-frameworks.sh\"\n"; 182 | showEnvVarsInLog = 0; 183 | }; 184 | B30CC98F389D79D62FB04F20 /* [CP] Check Pods Manifest.lock */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputFileListPaths = ( 190 | ); 191 | inputPaths = ( 192 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 193 | "${PODS_ROOT}/Manifest.lock", 194 | ); 195 | name = "[CP] Check Pods Manifest.lock"; 196 | outputFileListPaths = ( 197 | ); 198 | outputPaths = ( 199 | "$(DERIVED_FILE_DIR)/Pods-LPThumbnailViewExample-checkManifestLockResult.txt", 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | shellPath = /bin/sh; 203 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 204 | showEnvVarsInLog = 0; 205 | }; 206 | /* End PBXShellScriptBuildPhase section */ 207 | 208 | /* Begin PBXSourcesBuildPhase section */ 209 | A08B8B8C1FDF934000EBF8BD /* Sources */ = { 210 | isa = PBXSourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | A08B8B961FDF934000EBF8BD /* ViewController.swift in Sources */, 214 | A08B8B941FDF934000EBF8BD /* AppDelegate.swift in Sources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXSourcesBuildPhase section */ 219 | 220 | /* Begin PBXVariantGroup section */ 221 | A08B8B971FDF934000EBF8BD /* Main.storyboard */ = { 222 | isa = PBXVariantGroup; 223 | children = ( 224 | A08B8B981FDF934000EBF8BD /* Base */, 225 | ); 226 | name = Main.storyboard; 227 | sourceTree = ""; 228 | }; 229 | A08B8B9C1FDF934000EBF8BD /* LaunchScreen.storyboard */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | A08B8B9D1FDF934000EBF8BD /* Base */, 233 | ); 234 | name = LaunchScreen.storyboard; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXVariantGroup section */ 238 | 239 | /* Begin XCBuildConfiguration section */ 240 | A08B8BA01FDF934000EBF8BD /* Debug */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 247 | CLANG_CXX_LIBRARY = "libc++"; 248 | CLANG_ENABLE_MODULES = YES; 249 | CLANG_ENABLE_OBJC_ARC = YES; 250 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_COMMA = YES; 253 | CLANG_WARN_CONSTANT_CONVERSION = YES; 254 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INFINITE_RECURSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 263 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 266 | CLANG_WARN_STRICT_PROTOTYPES = YES; 267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 268 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 269 | CLANG_WARN_UNREACHABLE_CODE = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | CODE_SIGN_IDENTITY = "iPhone Developer"; 272 | COPY_PHASE_STRIP = NO; 273 | DEBUG_INFORMATION_FORMAT = dwarf; 274 | ENABLE_STRICT_OBJC_MSGSEND = YES; 275 | ENABLE_TESTABILITY = YES; 276 | GCC_C_LANGUAGE_STANDARD = gnu11; 277 | GCC_DYNAMIC_NO_PIC = NO; 278 | GCC_NO_COMMON_BLOCKS = YES; 279 | GCC_OPTIMIZATION_LEVEL = 0; 280 | GCC_PREPROCESSOR_DEFINITIONS = ( 281 | "DEBUG=1", 282 | "$(inherited)", 283 | ); 284 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 285 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 286 | GCC_WARN_UNDECLARED_SELECTOR = YES; 287 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 288 | GCC_WARN_UNUSED_FUNCTION = YES; 289 | GCC_WARN_UNUSED_VARIABLE = YES; 290 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 291 | MTL_ENABLE_DEBUG_INFO = YES; 292 | ONLY_ACTIVE_ARCH = YES; 293 | SDKROOT = iphoneos; 294 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 295 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 296 | SWIFT_VERSION = 4.2; 297 | }; 298 | name = Debug; 299 | }; 300 | A08B8BA11FDF934000EBF8BD /* Release */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | ALWAYS_SEARCH_USER_PATHS = NO; 304 | CLANG_ANALYZER_NONNULL = YES; 305 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | CODE_SIGN_IDENTITY = "iPhone Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 334 | ENABLE_NS_ASSERTIONS = NO; 335 | ENABLE_STRICT_OBJC_MSGSEND = YES; 336 | GCC_C_LANGUAGE_STANDARD = gnu11; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 340 | GCC_WARN_UNDECLARED_SELECTOR = YES; 341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 342 | GCC_WARN_UNUSED_FUNCTION = YES; 343 | GCC_WARN_UNUSED_VARIABLE = YES; 344 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 345 | MTL_ENABLE_DEBUG_INFO = NO; 346 | SDKROOT = iphoneos; 347 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 348 | SWIFT_VERSION = 4.2; 349 | VALIDATE_PRODUCT = YES; 350 | }; 351 | name = Release; 352 | }; 353 | A08B8BA31FDF934000EBF8BD /* Debug */ = { 354 | isa = XCBuildConfiguration; 355 | baseConfigurationReference = 7489F2E4EA37864455510C50 /* Pods-LPThumbnailViewExample.debug.xcconfig */; 356 | buildSettings = { 357 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 358 | CODE_SIGN_STYLE = Automatic; 359 | DEVELOPMENT_TEAM = 4FNMZ7SN42; 360 | INFOPLIST_FILE = LPThumbnailViewExample/Info.plist; 361 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.LPThumbnailViewExample; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SWIFT_VERSION = 4.2; 366 | TARGETED_DEVICE_FAMILY = "1,2"; 367 | }; 368 | name = Debug; 369 | }; 370 | A08B8BA41FDF934000EBF8BD /* Release */ = { 371 | isa = XCBuildConfiguration; 372 | baseConfigurationReference = 5CB4B2925E542F362FC7D07E /* Pods-LPThumbnailViewExample.release.xcconfig */; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | CODE_SIGN_STYLE = Automatic; 376 | DEVELOPMENT_TEAM = 4FNMZ7SN42; 377 | INFOPLIST_FILE = LPThumbnailViewExample/Info.plist; 378 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 380 | PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.LPThumbnailViewExample; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | SWIFT_VERSION = 4.2; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Release; 386 | }; 387 | /* End XCBuildConfiguration section */ 388 | 389 | /* Begin XCConfigurationList section */ 390 | A08B8B8B1FDF934000EBF8BD /* Build configuration list for PBXProject "LPThumbnailViewExample" */ = { 391 | isa = XCConfigurationList; 392 | buildConfigurations = ( 393 | A08B8BA01FDF934000EBF8BD /* Debug */, 394 | A08B8BA11FDF934000EBF8BD /* Release */, 395 | ); 396 | defaultConfigurationIsVisible = 0; 397 | defaultConfigurationName = Release; 398 | }; 399 | A08B8BA21FDF934000EBF8BD /* Build configuration list for PBXNativeTarget "LPThumbnailViewExample" */ = { 400 | isa = XCConfigurationList; 401 | buildConfigurations = ( 402 | A08B8BA31FDF934000EBF8BD /* Debug */, 403 | A08B8BA41FDF934000EBF8BD /* Release */, 404 | ); 405 | defaultConfigurationIsVisible = 0; 406 | defaultConfigurationName = Release; 407 | }; 408 | /* End XCConfigurationList section */ 409 | }; 410 | rootObject = A08B8B881FDF934000EBF8BD /* Project object */; 411 | } 412 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // LPThumbnailViewExample 4 | // 5 | // Created by Luis Padron on 12/11/17. 6 | // Copyright © 2017 Luis Padron. 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: [UIApplication.LaunchOptionsKey: 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 invalidate graphics rendering callbacks. 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 active 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/LPThumbnailViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Screen Shot 2017-12-08 at 11.29.56 PM.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg.imageset/Screen Shot 2017-12-08 at 11.29.56 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg.imageset/Screen Shot 2017-12-08 at 11.29.56 PM.png -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Screen Shot 2017-12-09 at 1.27.13 PM.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg2.imageset/Screen Shot 2017-12-09 at 1.27.13 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/Example/LPThumbnailViewExample/Assets.xcassets/ExampleImg2.imageset/Screen Shot 2017-12-09 at 1.27.13 PM.png -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/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 | 36 | 45 | 54 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/LPThumbnailViewExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // LPThumbnailViewExample 4 | // 5 | // Created by Luis Padron on 12/8/17. 6 | // Copyright © 2017 Luis Padron. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import LPThumbnailView 11 | 12 | class ViewController: UIViewController, LPThumbnailViewDelegate { 13 | 14 | var touchCount = 0 15 | 16 | @IBOutlet weak var thumbnailView: LPThumbnailView! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | // Set delegate 21 | self.thumbnailView.delegate = self 22 | } 23 | 24 | override func didReceiveMemoryWarning() { 25 | super.didReceiveMemoryWarning() 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | func animationStyle() -> LPThumbnailViewAnimationStyle { 30 | let rand = arc4random_uniform(5) 31 | switch rand { 32 | case 0: return .enterFromRight 33 | case 1: return .enterFromLeft 34 | case 2: return .enterFromTop 35 | case 3: return .enterFromBottom 36 | case 4: return .crossDissolve 37 | default: return .enterFromRight 38 | } 39 | } 40 | 41 | // Animates the thumbnail view using a context image view 42 | @IBAction func touchedWithContext(_ sender: Any) { 43 | let imgView = UIImageView(image: touchCount % 2 == 0 ? #imageLiteral(resourceName: "ExampleImg2") : #imageLiteral(resourceName: "ExampleImg")) 44 | imgView.frame = self.view.frame 45 | self.view.addSubview(imgView) 46 | thumbnailView.addImageWithContext(imgView) 47 | touchCount += 1 48 | } 49 | 50 | // Adds an image view using a random animation style 51 | @IBAction func touched(_ sender: Any) { 52 | thumbnailView.animationStyle = animationStyle() 53 | thumbnailView.addImage(touchCount % 2 == 0 ? #imageLiteral(resourceName: "ExampleImg2") : #imageLiteral(resourceName: "ExampleImg")) 54 | touchCount += 1 55 | } 56 | 57 | /// Removes the last added image 58 | @IBAction func removeButtonTouched(_ sender: Any) { 59 | self.thumbnailView.removeImage() 60 | } 61 | 62 | /// Asks for an index to delete an image 63 | @IBAction func removeButtonIndexTouched(_ sender: Any) { 64 | let alert = UIAlertController(title: "Index of image to delete", message: nil, preferredStyle: .alert) 65 | alert.addTextField { (textfield) in 66 | textfield.placeholder = "Index" 67 | textfield.textColor = .black 68 | } 69 | alert.addAction(UIAlertAction(title: "OK", style: .destructive, handler: { _ in 70 | guard let field = alert.textFields?.first else { return } 71 | DispatchQueue.main.async { 72 | self.thumbnailView.removeImage(at: Int(field.text!)!) 73 | } 74 | })) 75 | self.present(alert, animated: true, completion: nil) 76 | } 77 | 78 | func thumbnailViewWasTapped(_ view: LPThumbnailView) { 79 | print("Thumbnail tapped!") 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '10.0' 3 | 4 | target 'LPThumbnailViewExample' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | pod 'LPThumbnailView', :path => '..' 8 | 9 | end 10 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - LPThumbnailView (2.0.0) 3 | 4 | DEPENDENCIES: 5 | - LPThumbnailView (from `..`) 6 | 7 | EXTERNAL SOURCES: 8 | LPThumbnailView: 9 | :path: ".." 10 | 11 | SPEC CHECKSUMS: 12 | LPThumbnailView: 35a0c1cd661632578b93a46e1e25fc8d56c9e682 13 | 14 | PODFILE CHECKSUM: 419aec648e1e3c91f9831b2d3371b537b5ad4af7 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/LPThumbnailView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LPThumbnailView", 3 | "version": "2.0.0", 4 | "summary": "An image thumbnail view for iOS.", 5 | "description": "A thumbnail view for iOS to give context to multiple images/videos using thumbnails and counter.", 6 | "homepage": "https://github.com/luispadron/LPThumbnailView", 7 | "screenshots": "https://raw.githubusercontent.com/luispadron/LPThumbnailView/master/.github/thumbnail.png", 8 | "license": { 9 | "type": "MIT", 10 | "file": "LICENSE" 11 | }, 12 | "authors": { 13 | "Luis Padron": "heyluispadron@gmail.com" 14 | }, 15 | "social_media_url": "https://luispadron.com", 16 | "platforms": { 17 | "ios": "10.0" 18 | }, 19 | "source": { 20 | "git": "https://github.com/luispadron/LPThumbnailView.git", 21 | "tag": "v2.0.0" 22 | }, 23 | "source_files": [ 24 | "src/LPThumbnailView", 25 | "src/LPThumbnailView/**/*.{h,m}" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - LPThumbnailView (2.0.0) 3 | 4 | DEPENDENCIES: 5 | - LPThumbnailView (from `..`) 6 | 7 | EXTERNAL SOURCES: 8 | LPThumbnailView: 9 | :path: ".." 10 | 11 | SPEC CHECKSUMS: 12 | LPThumbnailView: 35a0c1cd661632578b93a46e1e25fc8d56c9e682 13 | 14 | PODFILE CHECKSUM: 419aec648e1e3c91f9831b2d3371b537b5ad4af7 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/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 | 2.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/LPThumbnailView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_LPThumbnailView : NSObject 3 | @end 4 | @implementation PodsDummy_LPThumbnailView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/LPThumbnailView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/LPThumbnailView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "LPThumbnailView.h" 14 | 15 | FOUNDATION_EXPORT double LPThumbnailViewVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char LPThumbnailViewVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/LPThumbnailView.modulemap: -------------------------------------------------------------------------------- 1 | framework module LPThumbnailView { 2 | umbrella header "LPThumbnailView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/LPThumbnailView/LPThumbnailView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/LPThumbnailView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## LPThumbnailView 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Luis Padron 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2017 Luis Padron 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | LPThumbnailView 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_LPThumbnailViewExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_LPThumbnailViewExample 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/LPThumbnailView/LPThumbnailView.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/LPThumbnailView/LPThumbnailView.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_LPThumbnailViewExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_LPThumbnailViewExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LPThumbnailView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/LPThumbnailView/LPThumbnailView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "LPThumbnailView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_LPThumbnailViewExample { 2 | umbrella header "Pods-LPThumbnailViewExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LPThumbnailViewExample/Pods-LPThumbnailViewExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LPThumbnailView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/LPThumbnailView/LPThumbnailView.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "LPThumbnailView" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Luis Padron 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 | -------------------------------------------------------------------------------- /LPThumbnailView.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "LPThumbnailView" 5 | s.version = "2.0.0" 6 | s.summary = "An image thumbnail view for iOS." 7 | 8 | s.description = <<-DESC 9 | A thumbnail view for iOS to give context to multiple images/videos using thumbnails and counter. 10 | DESC 11 | 12 | s.homepage = "https://github.com/luispadron/LPThumbnailView" 13 | s.screenshots = "https://raw.githubusercontent.com/luispadron/LPThumbnailView/master/.github/thumbnail.png" 14 | 15 | s.license = { :type => "MIT", :file => "LICENSE" } 16 | 17 | s.author = { "Luis Padron" => "heyluispadron@gmail.com" } 18 | s.social_media_url = "https://luispadron.com" 19 | 20 | s.ios.deployment_target = "10.0" 21 | s.source = { :git => "https://github.com/luispadron/LPThumbnailView.git", :tag => "v#{s.version}" } 22 | 23 | s.source_files = "src/LPThumbnailView", "src/LPThumbnailView/**/*.{h,m}" 24 | end 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## LPThumbnailView 2 | 3 | ![Banner](https://raw.githubusercontent.com/luispadron/LPThumbnailView/master/.github/banner.png) 4 | 5 |

6 | 7 |

8 | 9 |

A contextual image thumbnail view for iOS.

10 | 11 | ## Features 12 | 13 | - Easy to use 14 | - Sleek animations 15 | - Customizeable 16 | - Written in the latest Swift 17 | 18 | ## Requires 19 | 20 | - iOS 10.0+ 21 | 22 | ## Installation 23 | 24 | ### CocoaPods 25 | 26 | 1. Install [CocoaPods](https://cocoapods.org) 27 | 2. Add this repo to your `Podfile` 28 | 29 | ```ruby 30 | target 'Example' do 31 | # IMPORTANT: Make sure use_frameworks! is included at the top of the file 32 | use_frameworks! 33 | pod 'LPThumbnailView' 34 | end 35 | ``` 36 | 3. Run `pod install` 37 | 4. Open up the `.xcworkspace` that CocoaPods created 38 | 5. Done! 39 | 40 | ### Carthage 41 | 42 | To use with [Carthage](https://github.com/Carthage/Carthage) 43 | 44 | 1. Make sure Carthage is installed 45 | 46 | `brew install carthage` 47 | 2. Add this repo to your Cartfile 48 | 49 | `github "luispadron/LPThumbnailView"` 50 | 3. Drag the `LPThumbnailView.framework` from `MyProjDir/Carthage/Builds/iOS/LPThumbnailView` into the `General -> Embeded Binaries` section of your Xcode project. 51 | 52 | ### Manually 53 | 54 | 1. Simply download the source files from [here](https://github.com/luispadron/LPThumbnailView/tree/master/luispadron) and drag them into your project. 55 | 56 | ## Usage 57 | 58 | ### Simple animation 59 | 60 | ```swift 61 | // Pick your animation style 62 | thumbnailView.animationStyle = .enterFromRight 63 | // Simply add an image to the thumbnail view, animation is handled for you! 64 | thumbnailView.addImage(image) 65 | ``` 66 | 67 | ![Demo gif 1](https://raw.githubusercontent.com/luispadron/LPThumbnailView/master/.github/animation1.gif) 68 | 69 | ### Contextual animation 70 | 71 | ```swift 72 | // Create/use an existing image view you would like to be animated to the position of the thumbnail. 73 | let imgView = UIImageView(image: someImage) 74 | // Animation from imgView to thumbnail is handled for you! 75 | // imgView will animate to the correct frame and will be removed from the super view on completion of animation. 76 | thumbnailView.addImageWithContext(imgView) 77 | ``` 78 | 79 | Demo gif 2 80 | 81 | ## Documentation 82 | 83 | Please read the docs [here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/luispadron/LPThumbnailView/master/docs/Classes/LPThumbnailView.html) for more information and before posting an issue. 84 | 85 | ## Example Project 86 | 87 | Take a look at the example project [here](https://github.com/luispadron/LPThumbnailView/tree/master/Example) 88 | -------------------------------------------------------------------------------- /docs/Classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Classes Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Classes

61 |

The following classes are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailView 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailView

    81 | 82 |

    A thumbnail view for displaying images and give context in an application which takes photos/video thumbnails. 83 | Simply add to a view controler as a subview.

    84 | 85 | See more 86 |
    87 |
    88 |

    Declaration

    89 |
    90 |

    Swift

    91 |
    open class LPThumbnailView : UIView
    92 | 93 |
    94 |
    95 |
    96 |
    97 |
  • 98 |
99 |
100 |
101 |
102 | 106 |
107 |
108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /docs/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Enumerations

61 |

The following enumerations are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailViewAnimationStyle 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailViewAnimationStyle

    81 | 82 |

    Enum for determining the type of animation to use when calling addImage(_:duration:).

    83 | 84 | See more 85 |
    86 |
    87 |

    Declaration

    88 |
    89 |

    Swift

    90 |
    public enum LPThumbnailViewAnimationStyle
    91 | 92 |
    93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/Enums/LPThumbnailViewAnimationStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailViewAnimationStyle Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

LPThumbnailViewAnimationStyle

61 |
62 |
63 |
public enum LPThumbnailViewAnimationStyle
64 | 65 |
66 |
67 |

LPThumbnailViewAnimationStyle

68 | 69 |

Enum for determining the type of animation to use when calling addImage(_:duration:).

70 | 71 |
72 |
73 |
74 |
    75 |
  • 76 |
    77 | 78 | 79 | 80 | enterFromRight 81 | 82 |
    83 |
    84 |
    85 |
    86 |
    87 |
    88 |

    Animation which shows a temporary image entering from the right of LPThumbnailView then fades into the actual view.

    89 | 90 |
    91 |
    92 |

    Declaration

    93 |
    94 |

    Swift

    95 |
    case enterFromRight
    96 | 97 |
    98 |
    99 |
    100 |
    101 |
  • 102 |
  • 103 |
    104 | 105 | 106 | 107 | enterFromLeft 108 | 109 |
    110 |
    111 |
    112 |
    113 |
    114 |
    115 |

    Animation which shows a temporary image entering from the left of LPThumbnailView then fades into the actual view.

    116 | 117 |
    118 |
    119 |

    Declaration

    120 |
    121 |

    Swift

    122 |
    case enterFromLeft
    123 | 124 |
    125 |
    126 |
    127 |
    128 |
  • 129 |
  • 130 |
    131 | 132 | 133 | 134 | enterFromTop 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Animation which shows a temporary image entering from the top of LPThumbnailView then fades into the actual view.

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    case enterFromTop
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
  • 157 |
    158 | 159 | 160 | 161 | enterFromBottom 162 | 163 |
    164 |
    165 |
    166 |
    167 |
    168 |
    169 |

    Animation which shows a temporary image entering from underneath of LPThumbnailView then fades into the actual view.

    170 | 171 |
    172 |
    173 |

    Declaration

    174 |
    175 |

    Swift

    176 |
    case enterFromBottom
    177 | 178 |
    179 |
    180 |
    181 |
    182 |
  • 183 |
  • 184 |
    185 | 186 | 187 | 188 | crossDissolve 189 | 190 |
    191 |
    192 |
    193 |
    194 |
    195 |
    196 |

    Simply cross dissolves from the old image to the image animating to.

    197 | 198 |
    199 |
    200 |

    Declaration

    201 |
    202 |

    Swift

    203 |
    case crossDissolve
    204 | 205 |
    206 |
    207 |
    208 |
    209 |
  • 210 |
211 |
212 |
213 |
214 | 218 |
219 |
220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Protocols

61 |

The following protocols are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailViewDelegate 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailViewDelegate

    81 | 82 |

    The delegate responsible with listening to any touches or other updates that are called from LPThumbnailView

    83 | 84 | See more 85 |
    86 |
    87 |

    Declaration

    88 |
    89 |

    Swift

    90 |
    public protocol LPThumbnailViewDelegate : AnyObject
    91 | 92 |
    93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/Protocols/LPThumbnailViewDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailViewDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

LPThumbnailViewDelegate

61 |
62 |
63 |
public protocol LPThumbnailViewDelegate : AnyObject
64 | 65 |
66 |
67 |

LPThumbnailViewDelegate

68 | 69 |

The delegate responsible with listening to any touches or other updates that are called from LPThumbnailView

70 | 71 |
72 |
73 |
74 |
    75 |
  • 76 |
    77 | 78 | 79 | 80 | thumbnailViewWasTapped(_:) 81 | 82 |
    83 |
    84 |
    85 |
    86 |
    87 |
    88 |

    This function is called whenever a LPThumbnailView determines a touch has happened.

    89 | 90 |
    91 |
    92 |

    Declaration

    93 |
    94 |

    Swift

    95 |
    func thumbnailViewWasTapped(_ view: LPThumbnailView)
    96 | 97 |
    98 |
    99 |
    100 |
    101 |
  • 102 |
103 |
104 |
105 |
106 | 110 |
111 |
112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 100% 23 | 24 | 25 | 100% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.lpthumbnailview 7 | CFBundleName 8 | LPThumbnailView 9 | DocSetPlatformFamily 10 | lpthumbnailview 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/Classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Classes Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Classes

61 |

The following classes are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailView 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailView

    81 | 82 |

    A thumbnail view for displaying images and give context in an application which takes photos/video thumbnails. 83 | Simply add to a view controler as a subview.

    84 | 85 | See more 86 |
    87 |
    88 |

    Declaration

    89 |
    90 |

    Swift

    91 |
    open class LPThumbnailView : UIView
    92 | 93 |
    94 |
    95 |
    96 |
    97 |
  • 98 |
99 |
100 |
101 |
102 | 106 |
107 |
108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Enumerations

61 |

The following enumerations are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailViewAnimationStyle 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailViewAnimationStyle

    81 | 82 |

    Enum for determining the type of animation to use when calling addImage(_:duration:).

    83 | 84 | See more 85 |
    86 |
    87 |

    Declaration

    88 |
    89 |

    Swift

    90 |
    public enum LPThumbnailViewAnimationStyle
    91 | 92 |
    93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/Enums/LPThumbnailViewAnimationStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailViewAnimationStyle Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

LPThumbnailViewAnimationStyle

61 |
62 |
63 |
public enum LPThumbnailViewAnimationStyle
64 | 65 |
66 |
67 |

LPThumbnailViewAnimationStyle

68 | 69 |

Enum for determining the type of animation to use when calling addImage(_:duration:).

70 | 71 |
72 |
73 |
74 |
    75 |
  • 76 |
    77 | 78 | 79 | 80 | enterFromRight 81 | 82 |
    83 |
    84 |
    85 |
    86 |
    87 |
    88 |

    Animation which shows a temporary image entering from the right of LPThumbnailView then fades into the actual view.

    89 | 90 |
    91 |
    92 |

    Declaration

    93 |
    94 |

    Swift

    95 |
    case enterFromRight
    96 | 97 |
    98 |
    99 |
    100 |
    101 |
  • 102 |
  • 103 |
    104 | 105 | 106 | 107 | enterFromLeft 108 | 109 |
    110 |
    111 |
    112 |
    113 |
    114 |
    115 |

    Animation which shows a temporary image entering from the left of LPThumbnailView then fades into the actual view.

    116 | 117 |
    118 |
    119 |

    Declaration

    120 |
    121 |

    Swift

    122 |
    case enterFromLeft
    123 | 124 |
    125 |
    126 |
    127 |
    128 |
  • 129 |
  • 130 |
    131 | 132 | 133 | 134 | enterFromTop 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Animation which shows a temporary image entering from the top of LPThumbnailView then fades into the actual view.

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    case enterFromTop
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
  • 157 |
    158 | 159 | 160 | 161 | enterFromBottom 162 | 163 |
    164 |
    165 |
    166 |
    167 |
    168 |
    169 |

    Animation which shows a temporary image entering from underneath of LPThumbnailView then fades into the actual view.

    170 | 171 |
    172 |
    173 |

    Declaration

    174 |
    175 |

    Swift

    176 |
    case enterFromBottom
    177 | 178 |
    179 |
    180 |
    181 |
    182 |
  • 183 |
  • 184 |
    185 | 186 | 187 | 188 | crossDissolve 189 | 190 |
    191 |
    192 |
    193 |
    194 |
    195 |
    196 |

    Simply cross dissolves from the old image to the image animating to.

    197 | 198 |
    199 |
    200 |

    Declaration

    201 |
    202 |

    Swift

    203 |
    case crossDissolve
    204 | 205 |
    206 |
    207 |
    208 |
    209 |
  • 210 |
211 |
212 |
213 |
214 | 218 |
219 |
220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

Protocols

61 |

The following protocols are available globally.

62 | 63 |
64 |
65 |
66 |
    67 |
  • 68 |
    69 | 70 | 71 | 72 | LPThumbnailViewDelegate 73 | 74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |

    LPThumbnailViewDelegate

    81 | 82 |

    The delegate responsible with listening to any touches or other updates that are called from LPThumbnailView

    83 | 84 | See more 85 |
    86 |
    87 |

    Declaration

    88 |
    89 |

    Swift

    90 |
    public protocol LPThumbnailViewDelegate : AnyObject
    91 | 92 |
    93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/Protocols/LPThumbnailViewDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailViewDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

LPThumbnailView Docs (100% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 57 |
58 |
59 |
60 |

LPThumbnailViewDelegate

61 |
62 |
63 |
public protocol LPThumbnailViewDelegate : AnyObject
64 | 65 |
66 |
67 |

LPThumbnailViewDelegate

68 | 69 |

The delegate responsible with listening to any touches or other updates that are called from LPThumbnailView

70 | 71 |
72 |
73 |
74 |
    75 |
  • 76 |
    77 | 78 | 79 | 80 | thumbnailViewWasTapped(_:) 81 | 82 |
    83 |
    84 |
    85 |
    86 |
    87 |
    88 |

    This function is called whenever a LPThumbnailView determines a touch has happened.

    89 | 90 |
    91 |
    92 |

    Declaration

    93 |
    94 |

    Swift

    95 |
    func thumbnailViewWasTapped(_ view: LPThumbnailView)
    96 | 97 |
    98 |
    99 |
    100 |
    101 |
  • 102 |
103 |
104 |
105 |
106 | 110 |
111 |
112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailView Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

LPThumbnailView Docs (100% documented)

17 |

View on GitHub

18 |
19 |
20 |
21 | 26 |
27 |
28 | 56 |
57 |
58 |
59 | 60 |

LPThumbnailView

61 |

An image thumbnail view for iOS.

62 | 63 |

A thumbnail view for iOS to give context to multiple images/videos using thumbnails and counter.

64 |

Installation

65 |
pod 'LPThumbnailView'
66 | 
67 |

Authors

68 | 69 |

Luis

70 | 71 |
72 |
73 | 77 |
78 |
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/Documents/search.json: -------------------------------------------------------------------------------- 1 | {"Protocols/LPThumbnailViewDelegate.html#/s:15LPThumbnailView0aB8DelegateP09thumbnailB9WasTappedyyA2ACF":{"name":"thumbnailViewWasTapped(_:)","abstract":"

This function is called whenever a LPThumbnailView determines a touch has happened.

","parent_name":"LPThumbnailViewDelegate"},"Protocols/LPThumbnailViewDelegate.html":{"name":"LPThumbnailViewDelegate","abstract":"

LPThumbnailViewDelegate

"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO14enterFromRightyA2CmF":{"name":"enterFromRight","abstract":"

Animation which shows a temporary image entering from the right of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO13enterFromLeftyA2CmF":{"name":"enterFromLeft","abstract":"

Animation which shows a temporary image entering from the left of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO12enterFromTopyA2CmF":{"name":"enterFromTop","abstract":"

Animation which shows a temporary image entering from the top of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO15enterFromBottomyA2CmF":{"name":"enterFromBottom","abstract":"

Animation which shows a temporary image entering from underneath of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO13crossDissolveyA2CmF":{"name":"crossDissolve","abstract":"

Simply cross dissolves from the old image to the image animating to.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html":{"name":"LPThumbnailViewAnimationStyle","abstract":"

LPThumbnailViewAnimationStyle

"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC8delegateAA0aB8Delegate_pSgXwvp":{"name":"delegate","abstract":"

The delegate responsible for listening to touches/updates propogated from this view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC6imagesSaySo7UIImageCGvp":{"name":"images","abstract":"

The images which the LPThumbnailView will display.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14imageScaleModeSo013UIViewContentE0Vvp":{"name":"imageScaleMode","abstract":"

The scale mode to use for the imageView.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC030automaticallyCalculatesCounterB4SizeSbvp":{"name":"automaticallyCalculatesCounterViewSize","abstract":"

Whether or not the size of the counter view should be calculated automatically.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB4Size12CoreGraphics7CGFloatVvp":{"name":"counterViewSize","abstract":"

The size of counter view and it’s label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB10TopSpacing12CoreGraphics7CGFloatVvp":{"name":"counterViewTopSpacing","abstract":"

The amount of top spacing from the LPThumbnailView parent view to give to the counter view and label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB15TrailingSpacing12CoreGraphics7CGFloatVvp":{"name":"counterViewTrailingSpacing","abstract":"

The amount of trailing spacing from the LPThumbnailView parent view to give to the counter view and label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB5LabelSo7UILabelCvp":{"name":"counterViewLabel","abstract":"

An accessor for the label which displays the amount of images in the counter view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB15BackgroundColorSo7UIColorCvp":{"name":"counterViewBackgroundColor","abstract":"

The background color for the counter view which counts the number of images in the view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14animationStyleAA0ab9AnimationD0Ovp":{"name":"animationStyle","abstract":"

The animation style used when calling addImage

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB16AnimationOptionsSo06UIViewdE0Vvp":{"name":"counterViewAnimationOptions","abstract":"

The animation options used when animating the counter view label change.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14hidesWhenEmptySbvp":{"name":"hidesWhenEmpty","abstract":"

Whether or not this view automatically hides it self when there are no images to display.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/c:@M@LPThumbnailView@objc(cs)LPThumbnailView(im)initWithFrame:":{"name":"init(frame:)","abstract":"

Overriden initializer.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/c:@M@LPThumbnailView@objc(cs)LPThumbnailView(im)initWithCoder:":{"name":"init(coder:)","abstract":"

Overriden initializer.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC8addImage_8durationySo7UIImageC_SdtF":{"name":"addImage(_:duration:)","abstract":"

Adds an image to the images array and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC19addImageWithContext_8durationySo07UIImageB0C_SdtF":{"name":"addImageWithContext(_:duration:)","abstract":"

Adds an image to the images array and performs an animation with context.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC11removeImage8durationySd_tF":{"name":"removeImage(duration:)","abstract":"

Removes the last image in images and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC11removeImage2at8durationySi_SdtF":{"name":"removeImage(at:duration:)","abstract":"

Removes the image in images at the specified index and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC12removeImages_8durationySaySo7UIImageCG_SdtF":{"name":"removeImages(_:duration:)","abstract":"

Removes the images sent in from this views images array and performs an animation if and only if","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html":{"name":"LPThumbnailView","abstract":"

LPThumbnailView

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"}} -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/docsets/LPThumbnailView.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/LPThumbnailView.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/docsets/LPThumbnailView.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/docs/img/gh.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LPThumbnailView Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

LPThumbnailView Docs (100% documented)

17 |

View on GitHub

18 |
19 |
20 |
21 | 26 |
27 |
28 | 56 |
57 |
58 |
59 | 60 |

LPThumbnailView

61 |

An image thumbnail view for iOS.

62 | 63 |

A thumbnail view for iOS to give context to multiple images/videos using thumbnails and counter.

64 |

Installation

65 |
pod 'LPThumbnailView'
66 | 
67 |

Authors

68 | 69 |

Luis

70 | 71 |
72 |
73 | 77 |
78 |
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/search.json: -------------------------------------------------------------------------------- 1 | {"Protocols/LPThumbnailViewDelegate.html#/s:15LPThumbnailView0aB8DelegateP09thumbnailB9WasTappedyyA2ACF":{"name":"thumbnailViewWasTapped(_:)","abstract":"

This function is called whenever a LPThumbnailView determines a touch has happened.

","parent_name":"LPThumbnailViewDelegate"},"Protocols/LPThumbnailViewDelegate.html":{"name":"LPThumbnailViewDelegate","abstract":"

LPThumbnailViewDelegate

"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO14enterFromRightyA2CmF":{"name":"enterFromRight","abstract":"

Animation which shows a temporary image entering from the right of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO13enterFromLeftyA2CmF":{"name":"enterFromLeft","abstract":"

Animation which shows a temporary image entering from the left of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO12enterFromTopyA2CmF":{"name":"enterFromTop","abstract":"

Animation which shows a temporary image entering from the top of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO15enterFromBottomyA2CmF":{"name":"enterFromBottom","abstract":"

Animation which shows a temporary image entering from underneath of LPThumbnailView then fades into the actual view.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html#/s:15LPThumbnailView0aB14AnimationStyleO13crossDissolveyA2CmF":{"name":"crossDissolve","abstract":"

Simply cross dissolves from the old image to the image animating to.

","parent_name":"LPThumbnailViewAnimationStyle"},"Enums/LPThumbnailViewAnimationStyle.html":{"name":"LPThumbnailViewAnimationStyle","abstract":"

LPThumbnailViewAnimationStyle

"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC8delegateAA0aB8Delegate_pSgXwvp":{"name":"delegate","abstract":"

The delegate responsible for listening to touches/updates propogated from this view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC6imagesSaySo7UIImageCGvp":{"name":"images","abstract":"

The images which the LPThumbnailView will display.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14imageScaleModeSo013UIViewContentE0Vvp":{"name":"imageScaleMode","abstract":"

The scale mode to use for the imageView.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC030automaticallyCalculatesCounterB4SizeSbvp":{"name":"automaticallyCalculatesCounterViewSize","abstract":"

Whether or not the size of the counter view should be calculated automatically.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB4Size12CoreGraphics7CGFloatVvp":{"name":"counterViewSize","abstract":"

The size of counter view and it’s label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB10TopSpacing12CoreGraphics7CGFloatVvp":{"name":"counterViewTopSpacing","abstract":"

The amount of top spacing from the LPThumbnailView parent view to give to the counter view and label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB15TrailingSpacing12CoreGraphics7CGFloatVvp":{"name":"counterViewTrailingSpacing","abstract":"

The amount of trailing spacing from the LPThumbnailView parent view to give to the counter view and label.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB5LabelSo7UILabelCvp":{"name":"counterViewLabel","abstract":"

An accessor for the label which displays the amount of images in the counter view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB15BackgroundColorSo7UIColorCvp":{"name":"counterViewBackgroundColor","abstract":"

The background color for the counter view which counts the number of images in the view.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14animationStyleAA0ab9AnimationD0Ovp":{"name":"animationStyle","abstract":"

The animation style used when calling addImage

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC07counterB16AnimationOptionsSo06UIViewdE0Vvp":{"name":"counterViewAnimationOptions","abstract":"

The animation options used when animating the counter view label change.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC14hidesWhenEmptySbvp":{"name":"hidesWhenEmpty","abstract":"

Whether or not this view automatically hides it self when there are no images to display.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/c:@M@LPThumbnailView@objc(cs)LPThumbnailView(im)initWithFrame:":{"name":"init(frame:)","abstract":"

Overriden initializer.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/c:@M@LPThumbnailView@objc(cs)LPThumbnailView(im)initWithCoder:":{"name":"init(coder:)","abstract":"

Overriden initializer.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC8addImage_8durationySo7UIImageC_SdtF":{"name":"addImage(_:duration:)","abstract":"

Adds an image to the images array and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC19addImageWithContext_8durationySo07UIImageB0C_SdtF":{"name":"addImageWithContext(_:duration:)","abstract":"

Adds an image to the images array and performs an animation with context.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC11removeImage8durationySd_tF":{"name":"removeImage(duration:)","abstract":"

Removes the last image in images and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC11removeImage2at8durationySi_SdtF":{"name":"removeImage(at:duration:)","abstract":"

Removes the image in images at the specified index and performs an animation.

","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html#/s:15LPThumbnailViewAAC12removeImages_8durationySaySo7UIImageCG_SdtF":{"name":"removeImages(_:duration:)","abstract":"

Removes the images sent in from this views images array and performs an animation if and only if","parent_name":"LPThumbnailView"},"Classes/LPThumbnailView.html":{"name":"LPThumbnailView","abstract":"

LPThumbnailView

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"}} -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | 4 | ], 5 | "source_directory": "/Users/luis/Programming/iOS/LPThumbnailView/src" 6 | } -------------------------------------------------------------------------------- /run-jazzy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | jazzy --clean --source-directory src --output docs -a Luis Padron -u https://luispadron.com -m LPThumbnailView --module-version 1.0.0 -g https://github.com/luispadron/LPThumbnailView --theme apple 4 | -------------------------------------------------------------------------------- /src/LPThumbnailView.framework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luispadron/LPThumbnailView/ef34224b3f1b3efcb4546a47b9cb0c5bd26bb449/src/LPThumbnailView.framework.zip -------------------------------------------------------------------------------- /src/LPThumbnailView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/LPThumbnailView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/LPThumbnailView.xcodeproj/xcshareddata/xcschemes/LPThumbnailView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/LPThumbnailView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPShadowImageView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPShadowImageView.swift 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/9/17. 6 | // 7 | // MIT License 8 | // 9 | // Copyright (c) 2017 Luis Padron 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in all 19 | // copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | // SOFTWARE. 28 | // 29 | 30 | /** 31 | LPShadowImageView 32 | 33 | A simple view which contains an image view. 34 | This is needed to add both rounded corners AND shadow. 35 | Used inside of `LPThumbnailView` 36 | */ 37 | internal class LPShadowImageView: LPShadowView { 38 | // MARK: Members/Properties 39 | 40 | /// The image for the `imageView` 41 | internal var image: UIImage? = nil { 42 | didSet { self.imageView.image = self.image } 43 | } 44 | 45 | // MARK: Override 46 | 47 | /// Overriden init 48 | override init(frame: CGRect) { 49 | super.init(frame: frame) 50 | self.initialize() 51 | } 52 | 53 | /// Overriden init 54 | required init?(coder aDecoder: NSCoder) { 55 | super.init(coder: aDecoder) 56 | self.initialize() 57 | } 58 | 59 | /// The content mode for the `imageView` 60 | override var contentMode: UIView.ContentMode { 61 | didSet { self.imageView.contentMode = self.contentMode } 62 | } 63 | 64 | // MARK: Helpers 65 | 66 | /// Helper function to initialize the view. 67 | internal override func initialize() { 68 | super.initialize() 69 | self.addSubview(imageView) 70 | self.imageView.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true 71 | self.imageView.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true 72 | self.imageView.widthAnchor.constraint(equalTo: self.widthAnchor).isActive = true 73 | self.imageView.heightAnchor.constraint(equalTo: self.heightAnchor).isActive = true 74 | } 75 | 76 | // MARK: Subviews 77 | 78 | /// The image view which will be used inside of `LPThumbnailView` 79 | private lazy var imageView: UIImageView = { 80 | let imageView = UIImageView() 81 | imageView.translatesAutoresizingMaskIntoConstraints = false 82 | imageView.contentMode = self.contentMode 83 | imageView.clipsToBounds = true 84 | imageView.layer.cornerRadius = 10 85 | imageView.layer.borderColor = UIColor.white.cgColor 86 | imageView.layer.borderWidth = 3 87 | imageView.frame = self.frame 88 | return imageView 89 | }() 90 | } 91 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPShadowView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPShadowView.swift 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/12/17. 6 | // 7 | // MIT License 8 | // 9 | // Copyright (c) 2017 Luis Padron 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in all 19 | // copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | // SOFTWARE. 28 | // 29 | 30 | import UIKit 31 | 32 | /** 33 | Enum to determine the shadow type of a view. 34 | */ 35 | internal enum LPShadowType { 36 | /// Normal shadow, when view is not being touched. 37 | case normal 38 | /// Touched shadow, when view is being touched 39 | case touched 40 | } 41 | 42 | /** 43 | LPShadowView 44 | 45 | A simple view that draws a shadow and has some helper functions for updating/animating shadow. 46 | */ 47 | 48 | internal class LPShadowView: UIView { 49 | 50 | // MARK: Properties 51 | 52 | /// The shadow opacity when in the normal state 53 | internal var normalShadowOpactiy: Float = 0.7 54 | 55 | /// The shadow opacity when in the touchedstate 56 | internal var touchedShadowOpacity: Float = 0.4 57 | 58 | /// The shadow radius when in the normal state 59 | internal var normalShadowRadius: CGFloat = 4 60 | 61 | /// The shadow radius when in the touched state 62 | internal var touchedShadowRadius: CGFloat = 3 63 | 64 | // MARK: Init 65 | 66 | /// Overriden init 67 | override init(frame: CGRect) { 68 | super.init(frame: frame) 69 | self.initialize() 70 | } 71 | 72 | /// Overriden init 73 | required init?(coder aDecoder: NSCoder) { 74 | super.init(coder: aDecoder) 75 | self.initialize() 76 | } 77 | 78 | /// Initializes the view with a shadow 79 | internal func initialize() { 80 | self.setShadowTo(.normal, duration: 0.0) 81 | } 82 | 83 | // MARK: Shadow functions 84 | 85 | /// Updates the shadow of the view to the specified type. 86 | /// If duration = 0, no animation is performed. 87 | internal func setShadowTo(_ type: LPShadowType, duration: TimeInterval) { 88 | self.layer.shadowColor = UIColor.black.cgColor 89 | self.layer.shadowOffset = CGSize(width: 0, height: 0) 90 | 91 | // Animate the shadow opacity and radius change 92 | let shadowOpacityAnimation = CABasicAnimation(keyPath: "shadowOpacity") 93 | shadowOpacityAnimation.fromValue = type == .normal ? touchedShadowOpacity : normalShadowOpactiy 94 | shadowOpacityAnimation.toValue = type == .normal ? normalShadowOpactiy : touchedShadowOpacity 95 | shadowOpacityAnimation.duration = duration 96 | let shadowRadiusAnimation = CABasicAnimation(keyPath: "shadowRadius") 97 | shadowRadiusAnimation.fromValue = type == .normal ? touchedShadowRadius : normalShadowRadius 98 | shadowRadiusAnimation.toValue = type == .normal ? normalShadowRadius : touchedShadowRadius 99 | shadowRadiusAnimation.duration = duration 100 | self.layer.add(shadowOpacityAnimation, forKey: "shadowOpacity") 101 | self.layer.add(shadowRadiusAnimation, forKey: "shadowRadius") 102 | 103 | self.layer.shadowOpacity = type == .normal ? normalShadowOpactiy : touchedShadowOpacity 104 | self.layer.shadowRadius = type == .normal ? normalShadowRadius : touchedShadowRadius 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPThumbnailCounterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPThumbnailCounterView.swift 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/9/17. 6 | // 7 | // MIT License 8 | // 9 | // Copyright (c) 2017 Luis Padron 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in all 19 | // copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | // SOFTWARE. 28 | // 29 | 30 | import UIKit 31 | 32 | /** 33 | LPThumbnailCounterView 34 | 35 | A circular view with a label, used inside of `LPThumbnailView`. 36 | */ 37 | internal class LPThumbnailCounterView: LPShadowView { 38 | // MARK: Override 39 | 40 | /// Overriden init 41 | override init(frame: CGRect) { 42 | super.init(frame: frame) 43 | self.initialize() 44 | } 45 | 46 | /// Overriden init 47 | required init?(coder aDecoder: NSCoder) { 48 | super.init(coder: aDecoder) 49 | self.initialize() 50 | } 51 | 52 | /// Makes sure to update the corner radius on any bound changes. 53 | override func layoutSubviews() { 54 | super.layoutSubviews() 55 | self.layer.cornerRadius = self.bounds.width / 2 56 | } 57 | 58 | // MARK: Helpers 59 | 60 | /// Helper function to initialize the view 61 | internal override func initialize() { 62 | // Set shadow properties 63 | self.normalShadowRadius = 2 64 | self.normalShadowOpactiy = 0.4 65 | self.touchedShadowRadius = 1 66 | self.touchedShadowOpacity = 0.2 67 | self.setShadowTo(.normal, duration: 0.0) 68 | // Constraint setup 69 | self.translatesAutoresizingMaskIntoConstraints = false 70 | self.layer.cornerRadius = self.bounds.width / 2 71 | // Add constraints for label 72 | self.addSubview(counterLabel) 73 | self.counterLabel.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true 74 | self.counterLabel.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true 75 | self.counterLabel.widthAnchor.constraint(equalTo: self.widthAnchor).isActive = true 76 | self.counterLabel.heightAnchor.constraint(equalTo: self.heightAnchor).isActive = true 77 | } 78 | 79 | // MARK: Subviews 80 | 81 | /// The label which will display a count of the images in `LPThumbnailView` 82 | internal lazy var counterLabel: UILabel = { 83 | let label = UILabel() 84 | label.translatesAutoresizingMaskIntoConstraints = false 85 | label.textColor = .white 86 | label.font = UIFont.boldSystemFont(ofSize: 22) 87 | label.textAlignment = .center 88 | return label 89 | }() 90 | } 91 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPThumbnailView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPThumbnailView.h 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/8/17. 6 | // Copyright © 2017 Luis Padron. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for LPThumbnailView. 12 | FOUNDATION_EXPORT double LPThumbnailViewVersionNumber; 13 | 14 | //! Project version string for LPThumbnailView. 15 | FOUNDATION_EXPORT const unsigned char LPThumbnailViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPThumbnailViewAnimationStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPThumbnailViewAnimationStyle.swift 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/12/17. 6 | // 7 | // MIT License 8 | // 9 | // Copyright (c) 2017 Luis Padron 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in all 19 | // copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | // SOFTWARE. 28 | // 29 | 30 | /** 31 | LPThumbnailViewAnimationStyle 32 | 33 | Enum for determining the type of animation to use when calling `addImage(_:duration:)`. 34 | */ 35 | public enum LPThumbnailViewAnimationStyle { 36 | /// Animation which shows a temporary image entering from the right of `LPThumbnailView` then fades into the actual view. 37 | case enterFromRight 38 | /// Animation which shows a temporary image entering from the left of `LPThumbnailView` then fades into the actual view. 39 | case enterFromLeft 40 | /// Animation which shows a temporary image entering from the top of `LPThumbnailView` then fades into the actual view. 41 | case enterFromTop 42 | /// Animation which shows a temporary image entering from underneath of `LPThumbnailView` then fades into the actual view. 43 | case enterFromBottom 44 | /// Simply cross dissolves from the old image to the image animating to. 45 | case crossDissolve 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/LPThumbnailView/LPThumbnailViewDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPThumbnailViewDelegate.swift 3 | // LPThumbnailView 4 | // 5 | // Created by Luis Padron on 12/12/17. 6 | // 7 | // MIT License 8 | // 9 | // Copyright (c) 2017 Luis Padron 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in all 19 | // copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | // SOFTWARE. 28 | // 29 | 30 | /** 31 | LPThumbnailViewDelegate 32 | 33 | The delegate responsible with listening to any touches or other updates that are called from `LPThumbnailView` 34 | */ 35 | public protocol LPThumbnailViewDelegate: class { 36 | /// This function is called whenever a `LPThumbnailView` determines a touch has happened. 37 | func thumbnailViewWasTapped(_ view: LPThumbnailView) 38 | } 39 | -------------------------------------------------------------------------------- /src/LPThumbnailViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/LPThumbnailViewTests/LPThumbnailViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LPThumbnailViewTests.swift 3 | // LPThumbnailViewTests 4 | // 5 | // Created by Luis Padron on 12/8/17. 6 | // Copyright © 2017 Luis Padron. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import LPThumbnailView 11 | 12 | class LPThumbnailViewTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------