├── .gitignore ├── IMG_2047.JPG ├── README.md ├── UITableViewSnapshotTest.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── UITableViewSnapshotTest ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── Credit_logo.imageset │ │ ├── Contents.json │ │ └── Credit_logo@2x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── UITableViewSnapshot │ ├── UIImage+ZFImageFromArrayUtils.h │ ├── UIImage+ZFImageFromArrayUtils.m │ ├── UITableView+ZFTableViewSnapshot.h │ └── UITableView+ZFTableViewSnapshot.m ├── ViewController.h ├── ViewController.m └── main.m ├── ZFTableViewSnapshot.podspec └── ZFTableViewSnapshot ├── 1.0.0 └── ZFTableViewSnapshot.podspec ├── 1.0.1 └── ZFTableViewSnapshot.podspec └── 1.0.2 └── ZFTableViewSnapshot.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | *.xcscheme 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 52 | 53 | fastlane/report.xml 54 | fastlane/screenshots 55 | 56 | *.DS_Store 57 | */.DS_Store -------------------------------------------------------------------------------- /IMG_2047.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZFBest/UITableViewSnapshot/6198a006e5ba962bc279d26a3936ae6ad345f280/IMG_2047.JPG -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZFTableViewSnapshot 2 | 类似于高德地图路线截取tableView长图的功能 3 | 4 | #### pod 'ZFTableViewSnapshot', 5 | #### - Versions: 1.0.2, 1.0.1, 1.0.0 [master repo] 6 | 7 | #### 主要功能: 8 | #### 调用单个方法获取整个tableView长图,类似于高德地图路线截取长图的功能; 9 | #### 10 | ### 使用方法: 11 | #### 1.将Demo中UITableViewSnapshot文件夹拖进项目; 12 | #### 2.在使用的文件中导入#import "UITableView+ZFTableViewSnapshot.h"头文件; 13 | #### 3.调用[self.tableView screenshot]即可方法获取整个tableView长图,返回对象为UIImage类型。 14 | #### 15 | ### 截图示例: 16 | ![image](https://github.com/rzf1129/UITableViewSnapshotDemo/blob/master/IMG_2047.JPG) 17 | **********************希望大家多多支持********************** 18 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F028948D1C60AC300085F160 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F028948C1C60AC300085F160 /* main.m */; }; 11 | F02894901C60AC300085F160 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F028948F1C60AC300085F160 /* AppDelegate.m */; }; 12 | F02894931C60AC300085F160 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F02894921C60AC300085F160 /* ViewController.m */; }; 13 | F02894961C60AC300085F160 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F02894941C60AC300085F160 /* Main.storyboard */; }; 14 | F02894981C60AC300085F160 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F02894971C60AC300085F160 /* Assets.xcassets */; }; 15 | F028949B1C60AC300085F160 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F02894991C60AC300085F160 /* LaunchScreen.storyboard */; }; 16 | F02894A71C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = F02894A41C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.m */; }; 17 | F02894A81C60AC920085F160 /* UITableView+ZFTableViewSnapshot.m in Sources */ = {isa = PBXBuildFile; fileRef = F02894A61C60AC920085F160 /* UITableView+ZFTableViewSnapshot.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | F02894881C60AC300085F160 /* UITableViewSnapshotTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UITableViewSnapshotTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | F028948C1C60AC300085F160 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 23 | F028948E1C60AC300085F160 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 24 | F028948F1C60AC300085F160 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 25 | F02894911C60AC300085F160 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 26 | F02894921C60AC300085F160 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 27 | F02894951C60AC300085F160 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | F02894971C60AC300085F160 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 29 | F028949A1C60AC300085F160 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | F028949C1C60AC300085F160 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | F02894A31C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ZFImageFromArrayUtils.h"; sourceTree = ""; }; 32 | F02894A41C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ZFImageFromArrayUtils.m"; sourceTree = ""; }; 33 | F02894A51C60AC920085F160 /* UITableView+ZFTableViewSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+ZFTableViewSnapshot.h"; sourceTree = ""; }; 34 | F02894A61C60AC920085F160 /* UITableView+ZFTableViewSnapshot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+ZFTableViewSnapshot.m"; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | F02894851C60AC300085F160 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | F028947F1C60AC300085F160 = { 49 | isa = PBXGroup; 50 | children = ( 51 | F028948A1C60AC300085F160 /* UITableViewSnapshotTest */, 52 | F02894891C60AC300085F160 /* Products */, 53 | ); 54 | sourceTree = ""; 55 | }; 56 | F02894891C60AC300085F160 /* Products */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | F02894881C60AC300085F160 /* UITableViewSnapshotTest.app */, 60 | ); 61 | name = Products; 62 | sourceTree = ""; 63 | }; 64 | F028948A1C60AC300085F160 /* UITableViewSnapshotTest */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | F028948E1C60AC300085F160 /* AppDelegate.h */, 68 | F028948F1C60AC300085F160 /* AppDelegate.m */, 69 | F02894911C60AC300085F160 /* ViewController.h */, 70 | F02894921C60AC300085F160 /* ViewController.m */, 71 | F02894941C60AC300085F160 /* Main.storyboard */, 72 | F02894A21C60AC920085F160 /* ZFTableViewSnapshot */, 73 | F028948B1C60AC300085F160 /* Supporting Files */, 74 | ); 75 | path = UITableViewSnapshotTest; 76 | sourceTree = ""; 77 | }; 78 | F028948B1C60AC300085F160 /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | F02894971C60AC300085F160 /* Assets.xcassets */, 82 | F02894991C60AC300085F160 /* LaunchScreen.storyboard */, 83 | F028949C1C60AC300085F160 /* Info.plist */, 84 | F028948C1C60AC300085F160 /* main.m */, 85 | ); 86 | name = "Supporting Files"; 87 | sourceTree = ""; 88 | }; 89 | F02894A21C60AC920085F160 /* ZFTableViewSnapshot */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | F02894A31C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.h */, 93 | F02894A41C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.m */, 94 | F02894A51C60AC920085F160 /* UITableView+ZFTableViewSnapshot.h */, 95 | F02894A61C60AC920085F160 /* UITableView+ZFTableViewSnapshot.m */, 96 | ); 97 | name = ZFTableViewSnapshot; 98 | path = UITableViewSnapshot; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | F02894871C60AC300085F160 /* UITableViewSnapshotTest */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = F028949F1C60AC300085F160 /* Build configuration list for PBXNativeTarget "UITableViewSnapshotTest" */; 107 | buildPhases = ( 108 | F02894841C60AC300085F160 /* Sources */, 109 | F02894851C60AC300085F160 /* Frameworks */, 110 | F02894861C60AC300085F160 /* Resources */, 111 | ); 112 | buildRules = ( 113 | ); 114 | dependencies = ( 115 | ); 116 | name = UITableViewSnapshotTest; 117 | productName = UITableViewSnapshotTest; 118 | productReference = F02894881C60AC300085F160 /* UITableViewSnapshotTest.app */; 119 | productType = "com.apple.product-type.application"; 120 | }; 121 | /* End PBXNativeTarget section */ 122 | 123 | /* Begin PBXProject section */ 124 | F02894801C60AC300085F160 /* Project object */ = { 125 | isa = PBXProject; 126 | attributes = { 127 | LastUpgradeCheck = 0820; 128 | ORGANIZATIONNAME = com.9188; 129 | TargetAttributes = { 130 | F02894871C60AC300085F160 = { 131 | CreatedOnToolsVersion = 7.2; 132 | DevelopmentTeam = 747363KXQ6; 133 | ProvisioningStyle = Manual; 134 | }; 135 | }; 136 | }; 137 | buildConfigurationList = F02894831C60AC300085F160 /* Build configuration list for PBXProject "UITableViewSnapshotTest" */; 138 | compatibilityVersion = "Xcode 3.2"; 139 | developmentRegion = English; 140 | hasScannedForEncodings = 0; 141 | knownRegions = ( 142 | en, 143 | Base, 144 | ); 145 | mainGroup = F028947F1C60AC300085F160; 146 | productRefGroup = F02894891C60AC300085F160 /* Products */; 147 | projectDirPath = ""; 148 | projectRoot = ""; 149 | targets = ( 150 | F02894871C60AC300085F160 /* UITableViewSnapshotTest */, 151 | ); 152 | }; 153 | /* End PBXProject section */ 154 | 155 | /* Begin PBXResourcesBuildPhase section */ 156 | F02894861C60AC300085F160 /* Resources */ = { 157 | isa = PBXResourcesBuildPhase; 158 | buildActionMask = 2147483647; 159 | files = ( 160 | F028949B1C60AC300085F160 /* LaunchScreen.storyboard in Resources */, 161 | F02894981C60AC300085F160 /* Assets.xcassets in Resources */, 162 | F02894961C60AC300085F160 /* Main.storyboard in Resources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXResourcesBuildPhase section */ 167 | 168 | /* Begin PBXSourcesBuildPhase section */ 169 | F02894841C60AC300085F160 /* Sources */ = { 170 | isa = PBXSourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | F02894931C60AC300085F160 /* ViewController.m in Sources */, 174 | F02894A71C60AC920085F160 /* UIImage+ZFImageFromArrayUtils.m in Sources */, 175 | F02894901C60AC300085F160 /* AppDelegate.m in Sources */, 176 | F028948D1C60AC300085F160 /* main.m in Sources */, 177 | F02894A81C60AC920085F160 /* UITableView+ZFTableViewSnapshot.m in Sources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXSourcesBuildPhase section */ 182 | 183 | /* Begin PBXVariantGroup section */ 184 | F02894941C60AC300085F160 /* Main.storyboard */ = { 185 | isa = PBXVariantGroup; 186 | children = ( 187 | F02894951C60AC300085F160 /* Base */, 188 | ); 189 | name = Main.storyboard; 190 | sourceTree = ""; 191 | }; 192 | F02894991C60AC300085F160 /* LaunchScreen.storyboard */ = { 193 | isa = PBXVariantGroup; 194 | children = ( 195 | F028949A1C60AC300085F160 /* Base */, 196 | ); 197 | name = LaunchScreen.storyboard; 198 | sourceTree = ""; 199 | }; 200 | /* End PBXVariantGroup section */ 201 | 202 | /* Begin XCBuildConfiguration section */ 203 | F028949D1C60AC300085F160 /* Debug */ = { 204 | isa = XCBuildConfiguration; 205 | buildSettings = { 206 | ALWAYS_SEARCH_USER_PATHS = NO; 207 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 208 | CLANG_CXX_LIBRARY = "libc++"; 209 | CLANG_ENABLE_MODULES = YES; 210 | CLANG_ENABLE_OBJC_ARC = YES; 211 | CLANG_WARN_BOOL_CONVERSION = YES; 212 | CLANG_WARN_CONSTANT_CONVERSION = YES; 213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 214 | CLANG_WARN_EMPTY_BODY = YES; 215 | CLANG_WARN_ENUM_CONVERSION = YES; 216 | CLANG_WARN_INFINITE_RECURSION = YES; 217 | CLANG_WARN_INT_CONVERSION = YES; 218 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 219 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 220 | CLANG_WARN_UNREACHABLE_CODE = YES; 221 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 222 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 223 | COPY_PHASE_STRIP = NO; 224 | DEBUG_INFORMATION_FORMAT = dwarf; 225 | ENABLE_STRICT_OBJC_MSGSEND = YES; 226 | ENABLE_TESTABILITY = YES; 227 | GCC_C_LANGUAGE_STANDARD = gnu99; 228 | GCC_DYNAMIC_NO_PIC = NO; 229 | GCC_NO_COMMON_BLOCKS = YES; 230 | GCC_OPTIMIZATION_LEVEL = 0; 231 | GCC_PREPROCESSOR_DEFINITIONS = ( 232 | "DEBUG=1", 233 | "$(inherited)", 234 | ); 235 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 237 | GCC_WARN_UNDECLARED_SELECTOR = YES; 238 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 239 | GCC_WARN_UNUSED_FUNCTION = YES; 240 | GCC_WARN_UNUSED_VARIABLE = YES; 241 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 242 | MTL_ENABLE_DEBUG_INFO = YES; 243 | ONLY_ACTIVE_ARCH = YES; 244 | SDKROOT = iphoneos; 245 | }; 246 | name = Debug; 247 | }; 248 | F028949E1C60AC300085F160 /* Release */ = { 249 | isa = XCBuildConfiguration; 250 | buildSettings = { 251 | ALWAYS_SEARCH_USER_PATHS = NO; 252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 253 | CLANG_CXX_LIBRARY = "libc++"; 254 | CLANG_ENABLE_MODULES = YES; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_BOOL_CONVERSION = YES; 257 | CLANG_WARN_CONSTANT_CONVERSION = YES; 258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 259 | CLANG_WARN_EMPTY_BODY = YES; 260 | CLANG_WARN_ENUM_CONVERSION = YES; 261 | CLANG_WARN_INFINITE_RECURSION = YES; 262 | CLANG_WARN_INT_CONVERSION = YES; 263 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 264 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 265 | CLANG_WARN_UNREACHABLE_CODE = YES; 266 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 267 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 268 | COPY_PHASE_STRIP = NO; 269 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 270 | ENABLE_NS_ASSERTIONS = NO; 271 | ENABLE_STRICT_OBJC_MSGSEND = YES; 272 | GCC_C_LANGUAGE_STANDARD = gnu99; 273 | GCC_NO_COMMON_BLOCKS = YES; 274 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 275 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 276 | GCC_WARN_UNDECLARED_SELECTOR = YES; 277 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 278 | GCC_WARN_UNUSED_FUNCTION = YES; 279 | GCC_WARN_UNUSED_VARIABLE = YES; 280 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 281 | MTL_ENABLE_DEBUG_INFO = NO; 282 | SDKROOT = iphoneos; 283 | VALIDATE_PRODUCT = YES; 284 | }; 285 | name = Release; 286 | }; 287 | F02894A01C60AC300085F160 /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | DEVELOPMENT_TEAM = 747363KXQ6; 292 | INFOPLIST_FILE = UITableViewSnapshotTest/Info.plist; 293 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 294 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 295 | PRODUCT_BUNDLE_IDENTIFIER = com.huishuaka.UITableViewSnapshotTest; 296 | PRODUCT_NAME = "$(TARGET_NAME)"; 297 | PROVISIONING_PROFILE = "0c6f1353-2165-4f49-ad71-aa3ed3681d38"; 298 | PROVISIONING_PROFILE_SPECIFIER = HuishuakaTestDev; 299 | }; 300 | name = Debug; 301 | }; 302 | F02894A11C60AC300085F160 /* Release */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 306 | DEVELOPMENT_TEAM = ""; 307 | INFOPLIST_FILE = UITableViewSnapshotTest/Info.plist; 308 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 309 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 310 | PRODUCT_BUNDLE_IDENTIFIER = com.huishuaka.UITableViewSnapshotTest; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | }; 313 | name = Release; 314 | }; 315 | /* End XCBuildConfiguration section */ 316 | 317 | /* Begin XCConfigurationList section */ 318 | F02894831C60AC300085F160 /* Build configuration list for PBXProject "UITableViewSnapshotTest" */ = { 319 | isa = XCConfigurationList; 320 | buildConfigurations = ( 321 | F028949D1C60AC300085F160 /* Debug */, 322 | F028949E1C60AC300085F160 /* Release */, 323 | ); 324 | defaultConfigurationIsVisible = 0; 325 | defaultConfigurationName = Release; 326 | }; 327 | F028949F1C60AC300085F160 /* Build configuration list for PBXNativeTarget "UITableViewSnapshotTest" */ = { 328 | isa = XCConfigurationList; 329 | buildConfigurations = ( 330 | F02894A01C60AC300085F160 /* Debug */, 331 | F02894A11C60AC300085F160 /* Release */, 332 | ); 333 | defaultConfigurationIsVisible = 0; 334 | defaultConfigurationName = Release; 335 | }; 336 | /* End XCConfigurationList section */ 337 | }; 338 | rootObject = F02894801C60AC300085F160 /* Project object */; 339 | } 340 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UITableViewSnapshotTest 4 | // 5 | // Created by a9188 on 16/2/2. 6 | // Copyright © 2016年 com.9188. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // UITableViewSnapshotTest 4 | // 5 | // Created by a9188 on 16/2/2. 6 | // Copyright © 2016年 com.9188. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/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 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /UITableViewSnapshotTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /UITableViewSnapshotTest/Assets.xcassets/Credit_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Credit_logo@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /UITableViewSnapshotTest/Assets.xcassets/Credit_logo.imageset/Credit_logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZFBest/UITableViewSnapshot/6198a006e5ba962bc279d26a3936ae6ad345f280/UITableViewSnapshotTest/Assets.xcassets/Credit_logo.imageset/Credit_logo@2x.png -------------------------------------------------------------------------------- /UITableViewSnapshotTest/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 | 27 | 28 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | NSPhotoLibraryUsageDescription 40 | 需要您的同意才能使用相册 41 | 42 | 43 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/UITableViewSnapshot/UIImage+ZFImageFromArrayUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ZFImageFromArrayUtils.h 3 | // TableViewShotsTest 4 | // 5 | // Created by a9188 on 15/12/24. 6 | // Copyright © 2015年 com.9188. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (ZFImageFromArrayUtils) 12 | 13 | /** 14 | * 拼接图片 15 | * 16 | * @param imagesArray 截图数组 17 | */ 18 | + (UIImage *)verticalImageFromArray:(NSArray *)imagesArray; 19 | 20 | /** 21 | * 获取全部图片拼接后size(高总和) 22 | * 23 | * @param imagesArray 截图数组 24 | */ 25 | + (CGSize)verticalAppendedTotalImageSizeFromImagesArray:(NSArray *)imagesArray; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/UITableViewSnapshot/UIImage+ZFImageFromArrayUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ZFImageFromArrayUtils.m 3 | // TableViewShotsTest 4 | // 5 | // Created by a9188 on 15/12/24. 6 | // Copyright © 2015年 com.9188. All rights reserved. 7 | // 8 | 9 | #import "UIImage+ZFImageFromArrayUtils.h" 10 | 11 | @implementation UIImage (ZFImageFromArrayUtils) 12 | 13 | + (UIImage *)verticalImageFromArray:(NSArray *)imagesArray { 14 | UIImage *image = nil; 15 | CGSize totalImageSize = [self verticalAppendedTotalImageSizeFromImagesArray:imagesArray]; 16 | UIGraphicsBeginImageContextWithOptions(totalImageSize, NO, 0.f); 17 | 18 | //拼接图片 19 | int imageOffset = 0; 20 | for (UIImage *img in imagesArray) { 21 | [img drawAtPoint:CGPointMake(0, imageOffset)]; 22 | imageOffset += img.size.height; 23 | } 24 | 25 | image = UIGraphicsGetImageFromCurrentImageContext(); 26 | UIGraphicsEndImageContext(); 27 | 28 | return image; 29 | } 30 | 31 | + (CGSize)verticalAppendedTotalImageSizeFromImagesArray:(NSArray *)imagesArray { 32 | CGSize totalSize = CGSizeZero; 33 | for (UIImage *img in imagesArray) { 34 | CGSize imgSize = [img size]; 35 | totalSize.height += imgSize.height; 36 | totalSize.width = MAX(totalSize.width, imgSize.width); 37 | } 38 | return totalSize; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/UITableViewSnapshot/UITableView+ZFTableViewSnapshot.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+ZFTableViewSnapshot.h 3 | // TableViewShotsTest 4 | // 5 | // Created by a9188 on 15/12/24. 6 | // Copyright © 2015年 com.9188. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIImage+ZFImageFromArrayUtils.h" 11 | 12 | @interface UITableView (ZFTableViewSnapshot) 13 | 14 | /** 15 | * 最后截图快照 16 | */ 17 | - (UIImage *)zf_tableViewSnapshot; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/UITableViewSnapshot/UITableView+ZFTableViewSnapshot.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+ZFTableViewSnapshot.m 3 | // TableViewShotsTest 4 | // 5 | // Created by a9188 on 15/12/24. 6 | // Copyright © 2015年 com.9188. All rights reserved. 7 | // 8 | 9 | #import "UITableView+ZFTableViewSnapshot.h" 10 | 11 | @implementation UITableView (ZFTableViewSnapshot) 12 | 13 | /** 14 | * 最后截图快照 15 | */ 16 | - (UIImage *)zf_tableViewSnapshot { 17 | NSMutableArray *screenshots = [NSMutableArray array]; 18 | //表头快照 19 | UIImage *headerScreenshot = [self screenshotOfHeaderView]; 20 | 21 | if (headerScreenshot) [screenshots addObject:headerScreenshot]; 22 | 23 | for (int section=0; section 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // UITableViewSnapshotTest 4 | // 5 | // Created by a9188 on 16/2/2. 6 | // Copyright © 2016年 com.9188. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UITableView+ZFTableViewSnapshot.h" 11 | 12 | 13 | @interface ViewController () 14 | 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | 22 | [self.tableView registerClass:UITableViewCell.class forCellReuseIdentifier:NSStringFromClass(UITableViewCell.class)]; 23 | 24 | UILabel * tableHeaderView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 30)]; 25 | tableHeaderView.text = @"TableHeaderView"; 26 | tableHeaderView.contentMode = UIViewContentModeCenter; 27 | tableHeaderView.textAlignment = NSTextAlignmentCenter; 28 | self.tableView.tableHeaderView = tableHeaderView; 29 | 30 | UILabel * tableFooterView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 30)]; 31 | tableFooterView.text = @"TableFooterView"; 32 | tableFooterView.contentMode = UIViewContentModeCenter; 33 | tableFooterView.textAlignment = NSTextAlignmentCenter; 34 | self.tableView.tableFooterView = tableFooterView; 35 | } 36 | 37 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 38 | return 6; 39 | } 40 | 41 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 42 | return 6; 43 | } 44 | 45 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 46 | return [NSString stringWithFormat:@"Header In Section: %zi", section]; 47 | } 48 | 49 | - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { 50 | return [NSString stringWithFormat:@"Footer In Section: %zi", section]; 51 | } 52 | 53 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 54 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(UITableViewCell.class)]; 55 | cell.imageView.image = [UIImage imageNamed:@"Credit_logo"]; 56 | cell.textLabel.text = [NSString stringWithFormat:@"Section:%zi Row:%zi",indexPath.section, indexPath.row]; 57 | 58 | return cell; 59 | } 60 | 61 | //全屏截图,仅获取已绘制部分 62 | - (IBAction)screenSnapshotBtnClick:(id)sender { 63 | NSLog(@"----全屏截图---开始截图---------"); 64 | 65 | UIImage * snapshotImg = [self screenshot]; 66 | 67 | //保存相册 68 | UIImageWriteToSavedPhotosAlbum(snapshotImg, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); 69 | 70 | NSLog(@"----全屏截图结束---------"); 71 | } 72 | 73 | //列表截图 74 | - (IBAction)snapshotBtn:(UIButton *)sender { 75 | NSLog(@"----列表截图---开始截图---------"); 76 | UIImage * snapshotImg = [self.tableView zf_tableViewSnapshot]; 77 | 78 | ///结束之后滚动回顶部 79 | self.tableView.contentOffset = CGPointZero; 80 | 81 | //保存相册 82 | UIImageWriteToSavedPhotosAlbum(snapshotImg, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); 83 | 84 | NSLog(@"----列表截图结束---------"); 85 | } 86 | 87 | - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{ 88 | NSString *desc = @""; 89 | if (error == nil) { 90 | desc = @"保存相册成功"; 91 | }else{ 92 | desc = @"保存相册失败"; 93 | } 94 | NSLog(@"-------%@---------", desc); 95 | 96 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:desc delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 97 | [alertView show]; 98 | } 99 | 100 | //普通系统截屏,仅获取绘制部分 101 | - (UIImage *)screenshot{ 102 | UIGraphicsBeginImageContextWithOptions(self.tableView.frame.size, NO, [UIScreen mainScreen].scale); 103 | CGRect tableViewFrame = self.tableView.frame; 104 | self.tableView.frame = CGRectMake(0.0, 0.0, self.tableView.frame.size.width, self.tableView.contentSize.height); 105 | [self.tableView.layer renderInContext:UIGraphicsGetCurrentContext()]; 106 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 107 | UIGraphicsEndImageContext(); 108 | 109 | self.tableView.frame = tableViewFrame; 110 | 111 | return image; 112 | } 113 | 114 | 115 | - (void)didReceiveMemoryWarning { 116 | [super didReceiveMemoryWarning]; 117 | // Dispose of any resources that can be recreated. 118 | } 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /UITableViewSnapshotTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UITableViewSnapshotTest 4 | // 5 | // Created by a9188 on 16/2/2. 6 | // Copyright © 2016年 com.9188. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ZFTableViewSnapshot.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "ZFTableViewSnapshot" 5 | s.version = "1.0.2" 6 | s.summary = "ZFTableViewSnapshot - 类似于高德地图路线截取tableView长图的功能" 7 | s.description = "类似于高德地图路线截取tableView长图的功能。主要功能: 调用单个方法获取整个tableView长图,类似于高德地图路线截取长图的功能;使用方法:1.将Demo中UITableViewSnapshot文件夹拖进项目;2.在使用的文件中导入#import UITableView+ZFTableViewSnapshot.h头文件;3.调用[self.tableView screenshot]即可方法获取整个tableView长图,返回对象为UIImage类型。" 8 | s.homepage = "https://github.com/ZFBest/UITableViewSnapshot" 9 | s.license = { :type => 'MIT'} 10 | s.author = { "任占飞" => "renzhanfei@youyuwo.com" } 11 | s.platform = :ios, "8.0" 12 | s.source = { :git => "https://github.com/ZFBest/UITableViewSnapshot.git", :tag => "#{s.version}" } 13 | s.source_files = "ZFTableViewSnapshot", "UITableViewSnapshotTest/UITableViewSnapshot/*.{h,m}" 14 | 15 | end 16 | -------------------------------------------------------------------------------- /ZFTableViewSnapshot/1.0.0/ZFTableViewSnapshot.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint UITableViewSnapshot.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "ZFTableViewSnapshot" 19 | s.version = "1.0.0" 20 | s.summary = "ZFTableViewSnapshot - 类似于高德地图路线截取tableView长图的功能" 21 | s.description = "类似于高德地图路线截取tableView长图的功能。主要功能: 调用单个方法获取整个tableView长图,类似于高德地图路线截取长图的功能;使用方法:1.将Demo中UITableViewSnapshot文件夹拖进项目;2.在使用的文件中导入#import UITableView+ZFTableViewSnapshot.h头文件;3.调用[self.tableView screenshot]即可方法获取整个tableView长图,返回对象为UIImage类型。" 22 | 23 | s.homepage = "https://github.com/ZFBest/UITableViewSnapshot" 24 | s.license = { :type => 'MIT'} 25 | s.author = { "任占飞" => "renzhanfei@youyuwo.com" } 26 | 27 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 28 | s.platform = :ios, "8.0" 29 | s.source = { :git => "https://github.com/ZFBest/UITableViewSnapshot.git", :tag => "#{s.version}" } 30 | 31 | 32 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 33 | s.source_files = "ZFTableViewSnapshot", "UITableViewSnapshotTest/UITableViewSnapshot/*.{h,m}" 34 | 35 | 36 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 37 | # 38 | # A list of resources included with the Pod. These are copied into the 39 | # target bundle with a build phase script. Anything else will be cleaned. 40 | # You can preserve files from being cleaned, please don't preserve 41 | # non-essential files like tests, examples and documentation. 42 | # 43 | 44 | # s.resource = "icon.png" 45 | # s.resources = "Resources/*.png" 46 | 47 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 48 | 49 | 50 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 51 | # 52 | # Link your library with frameworks, or libraries. Libraries do not include 53 | # the lib prefix of their name. 54 | # 55 | 56 | # s.framework = "SomeFramework" 57 | # s.frameworks = "SomeFramework", "AnotherFramework" 58 | 59 | # s.library = "iconv" 60 | # s.libraries = "iconv", "xml2" 61 | 62 | 63 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # If your library depends on compiler flags you can set them in the xcconfig hash 66 | # where they will only apply to your library. If you depend on other Podspecs 67 | # you can include multiple dependencies to ensure it works. 68 | 69 | # s.requires_arc = true 70 | 71 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 72 | # s.dependency "JSONKit", "~> 1.4" 73 | 74 | end 75 | -------------------------------------------------------------------------------- /ZFTableViewSnapshot/1.0.1/ZFTableViewSnapshot.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint UITableViewSnapshot.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "ZFTableViewSnapshot" 19 | s.version = "1.0.1" 20 | s.summary = "ZFTableViewSnapshot - 类似于高德地图路线截取tableView长图的功能" 21 | s.description = "类似于高德地图路线截取tableView长图的功能。主要功能: 调用单个方法获取整个tableView长图,类似于高德地图路线截取长图的功能;使用方法:1.将Demo中UITableViewSnapshot文件夹拖进项目;2.在使用的文件中导入#import UITableView+ZFTableViewSnapshot.h头文件;3.调用[self.tableView screenshot]即可方法获取整个tableView长图,返回对象为UIImage类型。" 22 | 23 | s.homepage = "https://github.com/ZFBest/UITableViewSnapshot" 24 | s.license = { :type => 'MIT'} 25 | s.author = { "任占飞" => "renzhanfei@youyuwo.com" } 26 | 27 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 28 | s.platform = :ios, "8.0" 29 | s.source = { :git => "https://github.com/ZFBest/UITableViewSnapshot.git", :tag => "#{s.version}" } 30 | 31 | 32 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 33 | s.source_files = "ZFTableViewSnapshot", "UITableViewSnapshotTest/UITableViewSnapshot/*.{h,m}" 34 | 35 | 36 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 37 | # 38 | # A list of resources included with the Pod. These are copied into the 39 | # target bundle with a build phase script. Anything else will be cleaned. 40 | # You can preserve files from being cleaned, please don't preserve 41 | # non-essential files like tests, examples and documentation. 42 | # 43 | 44 | # s.resource = "icon.png" 45 | # s.resources = "Resources/*.png" 46 | 47 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 48 | 49 | 50 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 51 | # 52 | # Link your library with frameworks, or libraries. Libraries do not include 53 | # the lib prefix of their name. 54 | # 55 | 56 | # s.framework = "SomeFramework" 57 | # s.frameworks = "SomeFramework", "AnotherFramework" 58 | 59 | # s.library = "iconv" 60 | # s.libraries = "iconv", "xml2" 61 | 62 | 63 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # If your library depends on compiler flags you can set them in the xcconfig hash 66 | # where they will only apply to your library. If you depend on other Podspecs 67 | # you can include multiple dependencies to ensure it works. 68 | 69 | # s.requires_arc = true 70 | 71 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 72 | # s.dependency "JSONKit", "~> 1.4" 73 | 74 | end 75 | -------------------------------------------------------------------------------- /ZFTableViewSnapshot/1.0.2/ZFTableViewSnapshot.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "ZFTableViewSnapshot" 5 | s.version = "1.0.2" 6 | s.summary = "ZFTableViewSnapshot - 类似于高德地图路线截取tableView长图的功能" 7 | s.description = "类似于高德地图路线截取tableView长图的功能。主要功能: 调用单个方法获取整个tableView长图,类似于高德地图路线截取长图的功能;使用方法:1.将Demo中UITableViewSnapshot文件夹拖进项目;2.在使用的文件中导入#import UITableView+ZFTableViewSnapshot.h头文件;3.调用[self.tableView screenshot]即可方法获取整个tableView长图,返回对象为UIImage类型。" 8 | s.homepage = "https://github.com/ZFBest/UITableViewSnapshot" 9 | s.license = { :type => 'MIT'} 10 | s.author = { "任占飞" => "renzhanfei@youyuwo.com" } 11 | s.platform = :ios, "8.0" 12 | s.source = { :git => "https://github.com/ZFBest/UITableViewSnapshot.git", :tag => "#{s.version}" } 13 | s.source_files = "ZFTableViewSnapshot", "UITableViewSnapshotTest/UITableViewSnapshot/*.{h,m}" 14 | 15 | end 16 | --------------------------------------------------------------------------------