├── .gitattributes ├── ZXSlideSelectTableViewDemo ├── Pods │ ├── Headers │ │ ├── Public │ │ │ └── ZXTableView │ │ │ │ ├── ZXTableView.h │ │ │ │ ├── ZXTableViewConfig.h │ │ │ │ ├── ZXTbGetProName.h │ │ │ │ ├── NSObject+ZXTbAddPro.h │ │ │ │ └── NSObject+ZXTbSafeValue.h │ │ └── Private │ │ │ └── ZXTableView │ │ │ ├── ZXTableView.h │ │ │ ├── ZXTableViewConfig.h │ │ │ ├── ZXTbGetProName.h │ │ │ ├── NSObject+ZXTbAddPro.h │ │ │ └── NSObject+ZXTbSafeValue.h │ ├── Target Support Files │ │ ├── ZXTableView │ │ │ ├── ZXTableView-dummy.m │ │ │ ├── ZXTableView-prefix.pch │ │ │ └── ZXTableView.xcconfig │ │ └── Pods-ZXSlideSelectTableViewDemo │ │ │ ├── Pods-ZXSlideSelectTableViewDemo-dummy.m │ │ │ ├── Pods-ZXSlideSelectTableViewDemo.debug.xcconfig │ │ │ ├── Pods-ZXSlideSelectTableViewDemo.release.xcconfig │ │ │ ├── Pods-ZXSlideSelectTableViewDemo-acknowledgements.markdown │ │ │ └── Pods-ZXSlideSelectTableViewDemo-acknowledgements.plist │ ├── Manifest.lock │ ├── ZXTableView │ │ ├── ZXTableView │ │ │ ├── ZXTbExtension │ │ │ │ ├── NSObject+ZXTbAddPro.h │ │ │ │ ├── ZXTbGetProName.h │ │ │ │ ├── NSObject+ZXTbSafeValue.h │ │ │ │ ├── NSObject+ZXTbAddPro.m │ │ │ │ ├── NSObject+ZXTbSafeValue.m │ │ │ │ └── ZXTbGetProName.m │ │ │ ├── ZXTableViewConfig.h │ │ │ ├── ZXTableView.h │ │ │ └── ZXTableView.m │ │ ├── LICENSE │ │ └── README.md │ └── Pods.xcodeproj │ │ └── project.pbxproj ├── Podfile ├── ZXSlideSelectTableViewDemo │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── selected.imageset │ │ │ ├── selected.png │ │ │ └── Contents.json │ │ ├── unselected.imageset │ │ │ ├── unselected.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Demo │ │ ├── Model │ │ │ ├── DemoModel.m │ │ │ └── DemoModel.h │ │ ├── DemoVC.h │ │ ├── View │ │ │ ├── DemoCell.h │ │ │ ├── DemoHeaderView.h │ │ │ ├── DemoHeaderView.m │ │ │ ├── DemoCell.m │ │ │ ├── DemoHeaderView.xib │ │ │ └── DemoCell.xib │ │ ├── DemoVC.xib │ │ └── DemoVC.m │ ├── AppDelegate.h │ ├── main.m │ ├── ZXSlideSelectTableView │ │ ├── NSObject+ZXSlideSelectTableViewKVO.h │ │ ├── NSObject+ZXSlideSelectTableViewKVO.m │ │ ├── ZXSlideSelectTableView.h │ │ └── ZXSlideSelectTableView.m │ ├── Info.plist │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ └── AppDelegate.m ├── ZXSlideSelectTableViewDemo.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── project.pbxproj ├── ZXSlideSelectTableViewDemo.xcworkspace │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── contents.xcworkspacedata ├── Podfile.lock └── ZXSlideSelectTableViewDemoUITests │ ├── Info.plist │ └── ZXSlideSelectTableViewDemoUITests.m ├── ZXSlideSelectTableView.podspec ├── LICENSE ├── .gitignore └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Public/ZXTableView/ZXTableView.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTableView.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Private/ZXTableView/ZXTableView.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTableView.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | target 'ZXSlideSelectTableViewDemo' do 3 | pod 'ZXTableView' 4 | end -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Private/ZXTableView/ZXTableViewConfig.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTableViewConfig.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Public/ZXTableView/ZXTableViewConfig.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTableViewConfig.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Public/ZXTableView/ZXTbGetProName.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/ZXTbGetProName.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Private/ZXTableView/ZXTbGetProName.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/ZXTbGetProName.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Public/ZXTableView/NSObject+ZXTbAddPro.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Private/ZXTableView/NSObject+ZXTbAddPro.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Private/ZXTableView/NSObject+ZXTbSafeValue.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Headers/Public/ZXTableView/NSObject+ZXTbSafeValue.h: -------------------------------------------------------------------------------- 1 | ../../../ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.h -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/ZXTableView/ZXTableView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ZXTableView : NSObject 3 | @end 4 | @implementation PodsDummy_ZXTableView 5 | @end 6 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/selected.imageset/selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/ZXSlideSelectTableView/HEAD/ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/selected.imageset/selected.png -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/unselected.imageset/unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmileZXLee/ZXSlideSelectTableView/HEAD/ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/unselected.imageset/unselected.png -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ZXSlideSelectTableViewDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ZXSlideSelectTableViewDemo 5 | @end 6 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/Model/DemoModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoModel.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import "DemoModel.h" 10 | 11 | @implementation DemoModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/ZXTableView/ZXTableView-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 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ZXTableView (1.0.6) 3 | 4 | DEPENDENCIES: 5 | - ZXTableView 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - ZXTableView 10 | 11 | SPEC CHECKSUMS: 12 | ZXTableView: c08d20d1ff1bb9399c6e3191d751df5e59dc31fd 13 | 14 | PODFILE CHECKSUM: 7555e11a5bb8ad2225b7923c966eb335f63af4fd 15 | 16 | COCOAPODS: 1.6.1 17 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ZXTableView (1.0.6) 3 | 4 | DEPENDENCIES: 5 | - ZXTableView 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - ZXTableView 10 | 11 | SPEC CHECKSUMS: 12 | ZXTableView: c08d20d1ff1bb9399c6e3191d751df5e59dc31fd 13 | 14 | PODFILE CHECKSUM: 7555e11a5bb8ad2225b7923c966eb335f63af4fd 15 | 16 | COCOAPODS: 1.6.1 17 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/DemoVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoVC.h 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DemoVC : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoCell.h 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DemoCell : UITableViewCell 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoHeaderView.h 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DemoHeaderView : UIView 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/selected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "selected.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 | } -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Assets.xcassets/unselected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "unselected.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 | } -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXTbAddPro.h 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (ZXTbAddPro) 14 | @property (nonatomic, strong)NSNumber *cellHRunTime; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/ZXTbGetProName.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXTbGetProName.h 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ZXTbGetProName : NSObject 14 | +(NSMutableArray *)zx_getRecursionPropertyNames:(id)obj; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 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 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXTbSafeValue.h 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (ZXTbSafeValue) 14 | -(id)zx_safeValueForKey:(NSString *)key; 15 | -(void)zx_safeSetValue:(id)value forKey:(NSString *)key; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/Model/DemoModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoModel.h 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DemoModel : NSObject 14 | @property(copy, nonatomic) NSString *msg; 15 | //用来记录当前cell的选中状态,若此属性不为“selected”,请修改ZXSlideSelectTableView中的zx_modelSelectedKey为当前属性属性名 16 | @property(assign, nonatomic) BOOL selected; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZXTableView" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZXTableView" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ZXTableView" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZXTableView" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZXTableView" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ZXTableView" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /ZXSlideSelectTableView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ZXSlideSelectTableView' 3 | s.version = '1.0.5' 4 | s.summary = '快速、轻松地实现滑动选择tableView,支持各种自定义显示效果' 5 | s.homepage = 'https://github.com/SmileZXLee/ZXSlideSelectTableView' 6 | s.license = 'MIT' 7 | s.authors = {'李兆祥' => '393727164@qq.com'} 8 | s.platform = :ios, '8.0' 9 | s.source = {:git => 'https://github.com/SmileZXLee/ZXSlideSelectTableView.git', :tag => s.version} 10 | s.source_files = 'ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/ZXSlideSelectTableView/**/*' 11 | s.requires_arc = true 12 | s.dependency 'ZXTableView' 13 | end -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXTbAddPro.m 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import "NSObject+ZXTbAddPro.h" 10 | #import "objc/runtime.h" 11 | @implementation NSObject (ZXTbAddPro) 12 | -(void)setCellHRunTime:(NSNumber *)cellHRunTime{ 13 | objc_setAssociatedObject(self, @"cellHRunTime",cellHRunTime, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 14 | } 15 | 16 | - (NSNumber *)cellHRunTime 17 | { 18 | return objc_getAssociatedObject(self, @"cellHRunTime"); 19 | } 20 | @end 21 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/ZXTableView/ZXTableView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXTableView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ZXTableView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZXTableView" 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}/ZXTableView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/ZXSlideSelectTableView/NSObject+ZXSlideSelectTableViewKVO.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXSlideSelectTableViewKVO.h 3 | // ZXSlideSelectTableView 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | // 基于ZXTableView https://github.com/SmileZXLee/ZXTableView 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | typedef void(^obsResultHandler) (id newData, id oldData,id owner); 14 | @interface NSObject (ZXSlideSelectTableViewKVO) 15 | -(void)zx_slideSelectObsKey:(NSString *)key handler:(obsResultHandler)handler; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXTbSafeValue.m 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import "NSObject+ZXTbSafeValue.h" 10 | @implementation NSObject (ZXTbSafeValue) 11 | -(id)zx_safeValueForKey:(NSString *)key{ 12 | if([self hasKey:key]){ 13 | return [self valueForKey:key]; 14 | } 15 | return nil; 16 | } 17 | 18 | -(void)zx_safeSetValue:(id)value forKey:(NSString *)key{ 19 | if([self hasKey:key]){ 20 | [self setValue:value forKey:key]; 21 | } 22 | } 23 | 24 | -(BOOL)hasKey:(NSString *)key{ 25 | return [self respondsToSelector:NSSelectorFromString(key)]; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemoUITests/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 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoHeaderView.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import "DemoHeaderView.h" 10 | @interface DemoHeaderView() 11 | @property (weak, nonatomic) IBOutlet UILabel *headerViewLabel; 12 | //只需要定义section属性,ZXTableView就会自动赋值,重写其set方法即可 13 | @property (strong, nonatomic)NSNumber *section; 14 | @end 15 | @implementation DemoHeaderView 16 | 17 | - (void)awakeFromNib{ 18 | [super awakeFromNib]; 19 | self.backgroundColor = [UIColor colorWithRed:209/255.0 green:209/255.0 blue:209/255.0 alpha:1];; 20 | } 21 | 22 | - (void)setSection:(NSNumber *)section{ 23 | _section = section; 24 | self.headerViewLabel.text = [NSString stringWithFormat:@"Section %@",section]; 25 | } 26 | @end 27 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoCell.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import "DemoCell.h" 10 | #import "DemoModel.h" 11 | @interface DemoCell() 12 | @property (weak, nonatomic) IBOutlet UIButton *selectBtn; 13 | @property (weak, nonatomic) IBOutlet UILabel *msgLabel; 14 | //只需要定义含有“model”字符串的属性,ZXTableView就会自动赋值,重写其set方法即可 15 | @property (strong, nonatomic) DemoModel *demoModel; 16 | @end 17 | @implementation DemoCell 18 | 19 | - (void)awakeFromNib { 20 | [super awakeFromNib]; 21 | // Initialization code 22 | } 23 | 24 | - (void)setDemoModel:(DemoModel *)demoModel{ 25 | _demoModel = demoModel; 26 | self.msgLabel.text = demoModel.msg; 27 | self.selectBtn.selected = demoModel.selected; 28 | } 29 | - (IBAction)selectAction:(id)sender { 30 | self.demoModel.selected = !self.selectBtn.selected; 31 | self.selectBtn.selected = self.demoModel.selected; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 李兆祥 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. -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/ZXSlideSelectTableView/NSObject+ZXSlideSelectTableViewKVO.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+ZXSlideSelectTableViewKVO.m 3 | // ZXSlideSelectTableView 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | // 基于ZXTableView https://github.com/SmileZXLee/ZXTableView 9 | 10 | #import "NSObject+ZXSlideSelectTableViewKVO.h" 11 | @implementation NSObject (ZXSlideSelectTableViewKVO) 12 | 13 | #pragma mark - Public 14 | -(void)zx_slideSelectObsKey:(NSString *)key handler:(obsResultHandler)handler{ 15 | [self addObserver:self forKeyPath:key options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:(__bridge_retained void *)([handler copy])]; 16 | } 17 | 18 | #pragma mark - Private 19 | -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ 20 | if(object == self){ 21 | obsResultHandler handler = (__bridge obsResultHandler)context; 22 | handler(change[@"new"],change[@"old"],self); 23 | } 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 李兆祥 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. -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ZXTableView 5 | 6 | MIT License 7 | 8 | Copyright (c) 2019 李兆祥 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 | Generated by CocoaPods - https://cocoapods.org 28 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemoUITests/ZXSlideSelectTableViewDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXSlideSelectTableViewDemoUITests.m 3 | // ZXSlideSelectTableViewDemoUITests 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZXSlideSelectTableViewDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ZXSlideSelectTableViewDemoUITests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | 20 | // In UI tests it is usually best to stop immediately when a failure occurs. 21 | self.continueAfterFailure = NO; 22 | 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | [[[XCUIApplication alloc] init] launch]; 25 | 26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | } 32 | 33 | - (void)testExample { 34 | // Use recording to get started writing UI tests. 35 | // Use XCTAssert and related functions to verify your tests produce the correct results. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTableViewConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXTableViewConfig.h 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #ifndef ZXTableViewConfig_h 10 | #define ZXTableViewConfig_h 11 | #pragma mark - 数据处理配置 12 | ///model默认去匹配的cell高度属性名 若不存在则动态生成cellHRunTime的属性名 13 | static NSString *const CELLH = @"cellH"; 14 | ///cell会自动赋值包含“model”的属性 15 | static NSString *const DATAMODEL = @"model"; 16 | ///model与cell的index属性,存储当前model与cell所属的indexPath 17 | static NSString *const INDEX = @"indexPath"; 18 | ///headerView与footerView的section属性,存储当前headerView与footerView所属的section 19 | static NSString *const SECTION = @"section"; 20 | ///若ZXBaseTableView无法自动获取cell高度(zxdata有值即可),且用户未自定义高度,则使用默认高度 21 | static CGFloat const CELLDEFAULTH = 44; 22 | 23 | #pragma mark - TableView默认偏好配置 24 | ///无数据是否显示HeaderView,默认为YES 25 | static BOOL const ShowHeaderWhenNoMsg = YES; 26 | ///无数据是否显示FooterView,默认为YES 27 | static BOOL const ShowFooterWhenNoMsg = YES; 28 | ///保持headerView不变(仅初始化一次),默认为NO 29 | static BOOL const KeepStaticHeaderView = NO; 30 | ///保持footerView不变(仅初始化一次),默认为NO 31 | static BOOL const KeepStaticFooterView = NO; 32 | ///禁止系统Cell自动高度 可以有效解决tableView跳动问题,默认为YES 33 | static BOOL const DisableAutomaticDimension = YES; 34 | ///分割线样式,默认为UITableViewCellSeparatorStyleNone 35 | static BOOL const DefaultSeparatorStyle = UITableViewCellSeparatorStyleNone; 36 | 37 | #endif /* ZXTableViewConfig_h */ 38 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/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 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.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 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 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 | # Add this line if you want to avoid checking in source code from the Xcode workspace 40 | # *.xcworkspace 41 | 42 | # Carthage 43 | # 44 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 45 | # Carthage/Checkouts 46 | 47 | Carthage/Build 48 | 49 | # fastlane 50 | # 51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 52 | # screenshots whenever they are needed. 53 | # For more information about the recommended setup visit: 54 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 55 | 56 | fastlane/report.xml 57 | fastlane/Preview.html 58 | fastlane/screenshots/**/*.png 59 | fastlane/test_output 60 | 61 | # Code Injection 62 | # 63 | # After new code Injection tools there's a generated folder /iOSInjectionProject 64 | # https://github.com/johnno1962/injectionforxcode 65 | 66 | iOSInjectionProject/ 67 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/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 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/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 | } -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/ZXSlideSelectTableView/ZXSlideSelectTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXSlideSelectTableView.h 3 | // ZXSlideSelectTableView 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | // 基于ZXTableView https://github.com/SmileZXLee/ZXTableView 9 | 10 | #import "ZXTableView.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | typedef void(^kEnumEventHandler) (id model,BOOL *stop); 13 | @interface ZXSlideSelectTableView : ZXTableView 14 | ///cell选中状态发生改变回调,若调用了全选和取消全选触发,则selectedIndexPath和selectedModel均为nil 15 | @property (copy, nonatomic) void (^zx_selectedBlock)(NSIndexPath * _Nullable selectedIndexPath, id _Nullable selectedModel); 16 | ///滑动手势所在的view,若要设置其frame建议使用zx_gestureViewWidth或zx_gestureViewFrame 17 | @property(weak, nonatomic, readonly)UIView *zx_gestureView; 18 | ///数据模型中用于存储选中状态的属性名,默认为"selected" 19 | @property (copy, nonatomic)NSString *zx_modelSelectedKey; 20 | ///zx_gestureView的frame默认x,y都为0,高度等同于tableView的contentSize的高度,默认为(0,0,50,tableView.contentSize.height) 21 | ///设置手势识别区域的固定宽度 22 | @property (assign, nonatomic)CGFloat zx_gestureViewWidth; 23 | ///设置手势识别区域与左侧的固定距离 24 | @property (assign, nonatomic)CGFloat zx_gestureViewLeft; 25 | ///设置手势识别区域与右侧的固定距离(若此项设置,则zx_gestureViewLeft无效) 26 | @property (assign, nonatomic)CGFloat zx_gestureViewRight; 27 | ///设置手势识别区域与顶部的固定距离 28 | @property (assign, nonatomic)CGFloat zx_gestureViewTop; 29 | ///设置手势识别区域与底部的固定距离(若此项设置,则zx_gestureViewTop无效) 30 | @property (assign, nonatomic)CGFloat zx_gestureViewBottom; 31 | ///设置手势识别区域的frame,若设置,上方五个设置均无效,默认为(0,0,50,tableView.contentSize.height)[CGRect的height值随意填就好了,ZXSlideSelectTableView会根据具体情况自动调整它,CGRect的y最好是0,可根据自身要求调整] 32 | @property (copy, nonatomic)CGRect (^zx_gestureViewFrameBlock)(CGRect tableViewFrame); 33 | ///是否禁止自动设置选中状态(取反),若禁用,则只能选中,无法取消选中 34 | @property (assign, nonatomic)BOOL zx_disableAutoSelected; 35 | ///已选中的模型数组(涉及大量数据遍历,建议放在异步线程获取) 36 | @property (strong, nonatomic)NSMutableArray *zx_selectedArray; 37 | ///未选中的模型数组(涉及大量数据遍历,建议放在异步线程获取) 38 | @property (strong, nonatomic)NSMutableArray *zx_unSelectedArray; 39 | ///选中所有项 40 | - (void)zx_selectAll; 41 | ///取消选中所有项 42 | - (void)zx_unSelectAll; 43 | ///遍历获取所有model 44 | - (void)zx_enumModelsCallBack:(kEnumEventHandler)result; 45 | NS_ASSUME_NONNULL_END 46 | @end 47 | 48 | 49 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo-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) 2019 李兆祥 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 | License 39 | MIT 40 | Title 41 | ZXTableView 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Generated by CocoaPods - https://cocoapods.org 48 | Title 49 | 50 | Type 51 | PSGroupSpecifier 52 | 53 | 54 | StringsTable 55 | Acknowledgements 56 | Title 57 | Acknowledgements 58 | 59 | 60 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import "AppDelegate.h" 10 | #import "DemoVC.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | UIWindow *window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; 20 | DemoVC *VC = [[DemoVC alloc]init]; 21 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:VC]; 22 | window.rootViewController = nav; 23 | [window makeKeyAndVisible]; 24 | window.backgroundColor = [UIColor whiteColor]; 25 | self.window = window; 26 | return YES; 27 | } 28 | 29 | 30 | - (void)applicationWillResignActive:(UIApplication *)application { 31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 32 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 33 | } 34 | 35 | 36 | - (void)applicationDidEnterBackground:(UIApplication *)application { 37 | // 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. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | 42 | - (void)applicationWillEnterForeground:(UIApplication *)application { 43 | // 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. 44 | } 45 | 46 | 47 | - (void)applicationDidBecomeActive:(UIApplication *)application { 48 | // 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. 49 | } 50 | 51 | 52 | - (void)applicationWillTerminate:(UIApplication *)application { 53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTbExtension/ZXTbGetProName.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXTbGetProName.m 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import "ZXTbGetProName.h" 10 | #import 11 | @interface ZXTbGetProName() 12 | +(instancetype)shareInstance; 13 | @property(nonatomic,strong)NSMutableDictionary *proCacheMapper;; 14 | @end 15 | @implementation ZXTbGetProName 16 | + (instancetype)shareInstance{ 17 | static ZXTbGetProName * s_instance_dj_singleton = nil ; 18 | if (s_instance_dj_singleton == nil) { 19 | s_instance_dj_singleton = [[self alloc] init]; 20 | } 21 | return (ZXTbGetProName *)s_instance_dj_singleton; 22 | } 23 | 24 | +(NSMutableArray *)zx_getPropertyNames:(id)obj{ 25 | NSMutableDictionary *cacheMapper = [ZXTbGetProName shareInstance].proCacheMapper; 26 | NSString *objCls = NSStringFromClass([obj class]); 27 | if([cacheMapper.allKeys containsObject:objCls]){ 28 | return [cacheMapper[objCls] mutableCopy]; 29 | } 30 | NSMutableArray *propertyNamesArr = [NSMutableArray array]; 31 | u_int count; 32 | objc_property_t *properties = class_copyPropertyList([obj class],&count); 33 | for(NSUInteger i = 0;i < count;i++){ 34 | const char *propertyNameChar = property_getName(properties[i]); 35 | NSString *propertyNameStr = [NSString stringWithUTF8String: propertyNameChar]; 36 | [propertyNamesArr addObject:propertyNameStr]; 37 | 38 | } 39 | [cacheMapper setValue:[propertyNamesArr mutableCopy] forKey:objCls]; 40 | return propertyNamesArr ; 41 | } 42 | +(NSMutableArray *)zx_getRecursionPropertyNames:(id)obj{ 43 | NSMutableArray *propertyNamesArr = [self zx_getPropertyNames:obj]; 44 | if([self isSysClass:obj])return propertyNamesArr; 45 | Class class = [obj superclass]; 46 | while (true) { 47 | if(![self isSysClass:[class new]]){ 48 | NSMutableArray *superclassproArr = [self zx_getPropertyNames:class]; 49 | [propertyNamesArr addObjectsFromArray:superclassproArr]; 50 | }else{ 51 | break; 52 | } 53 | NSObject *obj = [class new]; 54 | class = obj.superclass; 55 | } 56 | return propertyNamesArr; 57 | } 58 | +(BOOL)superclassIsSysClass:(id)obj{ 59 | 60 | return !([NSBundle bundleForClass:[obj superclass]] == [NSBundle mainBundle]); 61 | } 62 | +(BOOL)isSysClass:(id)obj{ 63 | return !([NSBundle bundleForClass:[obj class]] == [NSBundle mainBundle]); 64 | } 65 | 66 | -(NSMutableDictionary *)proCacheMapper{ 67 | if(!_proCacheMapper){ 68 | _proCacheMapper = [NSMutableDictionary dictionary]; 69 | } 70 | return _proCacheMapper; 71 | } 72 | @end 73 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoHeaderView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/DemoVC.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/DemoVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoVC.m 3 | // ZXSlideSelectTableViewDemo 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | 9 | #import "DemoVC.h" 10 | #import "ZXSlideSelectTableView.h" 11 | #import "DemoHeaderView.h" 12 | #import "DemoCell.h" 13 | #import "DemoModel.h" 14 | @interface DemoVC () 15 | @property (weak, nonatomic) IBOutlet ZXSlideSelectTableView *tableView; 16 | @end 17 | 18 | @implementation DemoVC 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | self.title = @"ZXSlideSelectTableView"; 23 | [self setTableView]; 24 | [self setDatas]; 25 | [self setSetButtonWithTitle:@"全选"]; 26 | } 27 | 28 | #pragma mark - Private 29 | #pragma mark 设置tableView 30 | - (void)setTableView{ 31 | //首先需要设置self.tableView.zx_gestureView的frame,即滑动选择手势识别区域的frame,默认为(0,0,50,self.tableView.contentSize.height),根据项目的真实情况确定是否需要修改,建议通过self.tableView.zx_gestureViewWidth、self.tableView.zx_gestureViewLeft、self.tableView.zx_gestureViewRight、self.tableView.zx_gestureViewTop、self.tableView.zx_gestureViewBottom以及self.tableView.zx_gestureViewFrameBlock修改,不要直接设置frame,因为以上属性会根据tableView的contentSize改变自动调整 32 | __weak typeof(self) weakSelf = self; 33 | self.tableView.zx_gestureViewLeft = 0; 34 | //声明tableView的cell 35 | self.tableView.zx_setCellClassAtIndexPath = ^Class _Nonnull(NSIndexPath * _Nonnull indexPath) { 36 | return [DemoCell class]; 37 | }; 38 | //声明tableView的headerView 39 | self.tableView.zx_setHeaderClassInSection = ^Class _Nonnull(NSInteger section) { 40 | return [DemoHeaderView class]; 41 | }; 42 | //tableView中cell通过滑动手势选中事件回调 43 | self.tableView.zx_selectedBlock = ^(NSIndexPath * _Nonnull selectedIndexPath, id _Nonnull selectedModel) { 44 | weakSelf.title = [NSString stringWithFormat:@"已选中%ld个",weakSelf.tableView.zx_selectedArray.count]; 45 | }; 46 | //若点击了cell同样需要选中/取消选中效果,则需要实现以下代码 47 | //点击了tableView的cell 48 | self.tableView.zx_didSelectedAtIndexPath = ^(NSIndexPath * _Nonnull indexPath, DemoModel * _Nonnull model, id _Nonnull cell) { 49 | model.selected = !model.selected; 50 | [weakSelf.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; 51 | weakSelf.title = [NSString stringWithFormat:@"已选中%ld个",weakSelf.tableView.zx_selectedArray.count]; 52 | }; 53 | } 54 | 55 | #pragma mark 设置数据 56 | - (void)setDatas{ 57 | NSMutableArray *dataArr = [NSMutableArray array]; 58 | for(int i = 0; i < 6;i++){ 59 | NSMutableArray *sectionArr = [NSMutableArray array]; 60 | for(int j = 0; j < 10;j++){ 61 | DemoModel *demoModel = [[DemoModel alloc]init]; 62 | demoModel.msg = [NSString stringWithFormat:@"第%d行",j]; 63 | demoModel.selected = NO; 64 | [sectionArr addObject:demoModel]; 65 | } 66 | [dataArr addObject:sectionArr]; 67 | 68 | } 69 | self.tableView.zxDatas = dataArr; 70 | } 71 | 72 | #pragma mark 设置rightBarButtonItem 73 | - (void)setSetButtonWithTitle:(NSString *)title{ 74 | UIButton *setButton = [[UIButton alloc]init]; 75 | [setButton setTitle:title forState:UIControlStateNormal]; 76 | [setButton addTarget:self action:@selector(setAction:) forControlEvents:UIControlEventTouchUpInside]; 77 | [setButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 78 | UIBarButtonItem *setButtonItem = [[UIBarButtonItem alloc] initWithCustomView:setButton]; 79 | self.navigationItem.rightBarButtonItem = setButtonItem; 80 | } 81 | 82 | #pragma mark - Actions 83 | #pragma mark 点击了全选/取消全选 84 | - (void)setAction:(UIButton *)sender{ 85 | if([sender.currentTitle isEqualToString:@"全选"]){ 86 | //全选 87 | [self.tableView zx_selectAll]; 88 | [self setSetButtonWithTitle:@"取消全选"]; 89 | }else{ 90 | //取消全选 91 | [self.tableView zx_unSelectAll]; 92 | [self setSetButtonWithTitle:@"全选"]; 93 | } 94 | } 95 | 96 | - (void)dealloc{ 97 | NSLog(@"dealloc"); 98 | } 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZXSlideSelectTableView 2 | [![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/skx926/ZXSlideSelectTableView/master/LICENSE)  3 | [![CocoaPods](http://img.shields.io/cocoapods/v/ZXSlideSelectTableView.svg?style=flat)](http://cocoapods.org/?q=ZXTableView)  4 | [![CocoaPods](http://img.shields.io/cocoapods/p/ZXSlideSelectTableView.svg?style=flat)](http://cocoapods.org/?q=ZXTableView)  5 | [![Support](https://img.shields.io/badge/support-iOS%208.0%2B%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/)  6 | ## 安装 7 | ### 通过CocoaPods安装 8 | ```ruby 9 | pod 'ZXSlideSelectTableView' 10 | ``` 11 | ### 或手动导入 12 | * 将ZXTableView拖入项目中。 13 | * 将ZXSlideSelectTableView拖入项目中。 14 | ### 导入头文件 15 | ```objective-c 16 | #import "ZXSlideSelectTableView.h" 17 | ``` 18 | ## 预览 19 | 20 | 21 | ## 实现原理 22 | * ZXSlideSelectTableView基于[ZXTableView](https://github.com/SmileZXLee/ZXTableView)快速实现tableView的构造 23 | * 在此基础上ZXSlideSelectTableView通过在tableView上方添加一个覆盖所有选择按钮的gestureView并监听其拖动与点击事件,通过将对应事件的point转换为tableView中的indexPath并修改对应indexPath中的model的"selected"达到选中与取消选中的效果 24 | 25 | ## 快速使用 26 | ### 建议查看项目中Demo文件夹中的例子 27 | 1.创建一个ZXSlideSelectTableView 28 | 2.创建需要在tableView中显示的cell和对应的model类 29 | 3.请注意,必须在model中声明"selected"属性 30 | ```objective-c 31 | @interface DemoModel : NSObject 32 | @property(copy, nonatomic) NSString *msg; 33 | @property(assign, nonatomic) BOOL selected; 34 | @end 35 | ``` 36 | * 如果您的model中用于记录当前cell是否选中的属性不为"selected",请修改model中的属性名或设置ZXSlideSelectTableView的zx_modelSelectedKey值为您当前model中用于记录当前cell是否选中的属性名 37 | 38 | 4.在控制器中声明tableView中的cell 39 | ```objective-c 40 | self.tableView.zx_setCellClassAtIndexPath = ^Class _Nonnull(NSIndexPath * _Nonnull indexPath) { 41 | return [DemoCell class]; 42 | }; 43 | ``` 44 | 5.给tableView设置数据 45 | ```objective-c 46 | - (void)setDatas{ 47 | NSMutableArray *dataArr = [NSMutableArray array]; 48 | for(int i = 0; i < 6;i++){ 49 | NSMutableArray *sectionArr = [NSMutableArray array]; 50 | for(int j = 0; j < 10;j++){ 51 | DemoModel *demoModel = [[DemoModel alloc]init]; 52 | demoModel.msg = [NSString stringWithFormat:@"第%d行",j]; 53 | demoModel.selected = NO; 54 | [sectionArr addObject:demoModel]; 55 | } 56 | [dataArr addObject:sectionArr]; 57 | 58 | } 59 | self.tableView.zxDatas = dataArr; 60 | } 61 | ``` 62 | * 至此,一个基础的ZXSlideSelectTableView就完成了 63 | 64 | ## 使用进阶 65 | ### ZXSlideSelectTableView相关 66 | #### cell选中状态发生改变回调 67 | ```objective-c 68 | self.tableView.zx_selectedBlock = ^(NSIndexPath * _Nonnull selectedIndexPath, id _Nonnull selectedModel) { 69 | weakSelf.title = [NSString stringWithFormat:@"已选中%ld个",weakSelf.tableView.zx_selectedArray.count]; 70 | }; 71 | ``` 72 | #### 设置数据模型中用于存储选中状态的属性名,默认为"selected" 73 | ```objective-c 74 | //将会自动把选中状态赋值给model中的selectedTest属性 75 | self.tableView.zx_modelSelectedKey = @"selectedTest"; 76 | ``` 77 | #### zx_gestureView的frame默认x,y都为0,高度等同于tableView的contentSize的高度,默认为(0,0,50,tableView.contentSize.height) 78 | #### 设置手势识别区域的固定宽度 79 | ```objective-c 80 | self.tableView.zx_gestureViewWidth = 60; 81 | ``` 82 | #### 设置手势识别区域与左侧的固定距离(默认为0) 83 | ```objective-c 84 | self.tableView.zx_gestureViewLeft = 10; 85 | ``` 86 | #### 设置手势识别区域与右侧的固定距离(若此项设置,则zx_gestureViewLeft无效) 87 | ```objective-c 88 | self.tableView.zx_gestureViewRight = 0; 89 | ``` 90 | #### 设置手势识别区域与顶部的固定距离(默认为0) 91 | ```objective-c 92 | self.tableView.zx_gestureViewTop = 10; 93 | ``` 94 | #### 设置手势识别区域与底部的固定距离(若此项设置,则zx_gestureViewTop无效) 95 | ```objective-c 96 | self.tableView.zx_gestureViewBottom = 10; 97 | ``` 98 | #### 设置手势识别区域的frame,若设置,上方五个设置均无效,默认为(0,0,50,tableView.contentSize.height)[CGRect的height值随意填就好了,ZXSlideSelectTableView会根据具体情况自动调整它,CGRect的y最好是0,可根据自身要求调整] 99 | ```objective-c 100 | self.tableView.zx_gestureViewFrameBlock = ^CGRect(CGRect tableViewFrame) { 101 | return CGRectMake(10, 10, 60, 0); 102 | }; 103 | ``` 104 | #### 是否禁止自动设置选中状态(取反),若禁用,则只能选中,无法取消选中 105 | ```objective-c 106 | self.tableView.zx_disableAutoSelected = YES; 107 | ``` 108 | #### 已选中的模型数组(涉及大量数据遍历,建议放在异步线程获取) 109 | ```objective-c 110 | NSMutableArray *selectedArray = self.tableView.zx_selectedArray; 111 | ``` 112 | #### 未选中的模型数组(涉及大量数据遍历,建议放在异步线程获取) 113 | ```objective-c 114 | NSMutableArray *unSelectedArray = self.tableView.zx_unSelectedArray; 115 | ``` 116 | #### 选中所有项 117 | ```objective-c 118 | [self.tableView zx_selectAll]; 119 | ``` 120 | #### 取消选中所有项 121 | ```objective-c 122 | [self.tableView zx_unSelectAll]; 123 | ``` 124 | #### 遍历获取所有model 125 | ```objective-c 126 | [self zx_enumModelsCallBack:^(id _Nonnull model, BOOL * _Nonnull stop) { 127 | NSLog(@"model--%@",model); 128 | }]; 129 | ``` 130 | 131 | ### ZXTableView相关 132 | #### 和TableView相关的设置,详见:https://github.com/SmileZXLee/ZXTableView/blob/master/README.md 133 | 134 | *** 135 | 136 | ## 感谢使用,有任何问题欢迎随时issue我 137 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZXTableView.h 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import 10 | NS_ASSUME_NONNULL_BEGIN 11 | @interface ZXTableView : UITableView 12 | #pragma mark - 数据设置 13 | ///设置所有数据数组 14 | @property(nonatomic, strong)NSMutableArray *zxDatas; 15 | ///声明cell的类 16 | @property (nonatomic, copy) Class (^zx_setCellClassAtIndexPath)(NSIndexPath *indexPath); 17 | ///设置cell的高度(非必须,若设置了,则内部的自动计算高度无效) 18 | @property (nonatomic, copy) CGFloat (^zx_setCellHAtIndexPath)(NSIndexPath *indexPath); 19 | ///设置section数量(非必须,若设置了,则内部自动设置section个数无效) 20 | @property (nonatomic, copy) CGFloat (^zx_setNumberOfSectionsInTableView)(UITableView *tableView); 21 | ///设置对应section中row的数量(非必须,若设置了,则内部自动设置对应section中row的数量无效) 22 | @property (nonatomic, copy) CGFloat (^zx_setNumberOfRowsInSection)(NSUInteger section); 23 | ///根据HeaderView类名设置HeaderView,写了此方法则zx_setHeaderViewInSection无效,无需实现zx_setHeaderHInSection,自动计算高度 24 | @property (nonatomic, copy) Class (^zx_setHeaderClassInSection)(NSInteger section); 25 | ///根据FooterView类名设置FooterView,写了此方法则zx_setFooterViewInSection无效,无需实现zx_setFooterHInSection,自动计算高度 26 | @property (nonatomic, copy) Class (^zx_setFooterClassInSection)(NSInteger section); 27 | ///设置HeaderView,必须实现zx_setHeaderHInSection 28 | @property (nonatomic, copy) UIView *(^zx_setHeaderViewInSection)(NSInteger section); 29 | ///设置FooterView,必须实现zx_setFooterHInSection 30 | @property (nonatomic, copy) UIView *(^zx_setFooterViewInSection)(NSInteger section); 31 | ///设置HeaderView高度,非必须,若设置了则自动设置的HeaderView高度无效 32 | @property (nonatomic, copy) CGFloat (^zx_setHeaderHInSection)(NSInteger section); 33 | ///设置FooterView高度,非必须,若设置了则自动设置的FooterView高度无效 34 | @property (nonatomic, copy) CGFloat (^zx_setFooterHInSection)(NSInteger section); 35 | ///禁止系统Cell自动高度 可以有效解决tableView跳动问题,默认为YES 36 | @property(nonatomic, assign)BOOL zx_disableAutomaticDimension; 37 | ///无数据是否显示HeaderView,默认为YES 38 | @property(nonatomic, assign)BOOL zx_showHeaderWhenNoMsg; 39 | ///无数据是否显示FooterView,默认为YES 40 | @property(nonatomic, assign)BOOL zx_showFooterWhenNoMsg; 41 | ///保持headerView不变(仅初始化一次),默认为NO 42 | @property(nonatomic, assign)BOOL zx_keepStaticHeaderView; 43 | ///保持footerView不变(仅初始化一次),默认为NO 44 | @property(nonatomic, assign)BOOL zx_keepStaticFooterView; 45 | #pragma mark - 数据获取 46 | ///获取对应行的cell,把id改成对应类名即可无需强制转换 47 | @property (nonatomic, copy) void (^zx_getCellAtIndexPath)(NSIndexPath *indexPath,id cell,id model); 48 | ///获取对应section的headerView,把id改成对应类名即可无需强制转换,secArr为对应section的model数组 49 | @property (nonatomic, copy) void (^zx_getHeaderViewInSection)(NSUInteger section,id headerView,NSMutableArray *secArr); 50 | ///获取对应section的footerView,把id改成对应类名即可无需强制转换,secArr为对应section的model数组 51 | @property (nonatomic, copy) void (^zx_getFooterViewInSection)(NSUInteger section,id footerView,NSMutableArray *secArr); 52 | #pragma mark - 快速构建 53 | ///声明cell的类并返回cell对象 54 | -(void)zx_setCellClassAtIndexPath:(Class (^)(NSIndexPath * indexPath)) setCellClassCallBack returnCell:(void (^)(NSIndexPath * indexPath,id cell,id model))returnCellCallBack; 55 | ///声明HeaderView的类并返回HeaderView对象 56 | -(void)zx_setHeaderClassInSection:(Class (^)(NSInteger section)) setHeaderClassCallBack returnHeader:(void (^)(NSUInteger section,id headerView,NSMutableArray *secArr))returnHeaderCallBack; 57 | ///声明FooterView的类并返回FooterView对象 58 | -(void)zx_setFooterClassInSection:(Class (^)(NSInteger section)) setFooterClassCallBack returnHeader:(void (^)(NSUInteger section,id headerView,NSMutableArray *secArr))returnFooterCallBack; 59 | #pragma mark - 代理事件相关 60 | ///选中某一行,把id改成对应类名即可无需强制转换 61 | @property (nonatomic, copy) void (^zx_didSelectedAtIndexPath)(NSIndexPath *indexPath,id model,id cell); 62 | ///取消选中某一行,把id改成对应类名即可无需强制转换 63 | @property (nonatomic, copy) void (^zx_didDeselectedAtIndexPath)(NSIndexPath *indexPath,id model,id cell); 64 | ///滑动编辑 65 | @property (nonatomic, copy) NSArray* (^zx_editActionsForRowAtIndexPath)(NSIndexPath *indexPath); 66 | ///cell将要展示,把id改成对应类名即可无需强制转换 67 | @property (nonatomic, copy) void (^zx_willDisplayCell)(NSIndexPath *indexPath,id cell); 68 | ///scrollView滚动事件 69 | @property (nonatomic, copy) void (^zx_scrollViewDidScroll)(UIScrollView *scrollView); 70 | ///scrollView缩放事件 71 | @property (nonatomic, copy) void (^zx_scrollViewDidZoom)(UIScrollView *scrollView); 72 | ///scrollView滚动到顶部事件 73 | @property (nonatomic, copy) void (^zx_scrollViewDidScrollToTop)(UIScrollView *scrollView); 74 | ///scrollView开始拖拽事件 75 | @property (nonatomic, copy) void (^zx_scrollViewWillBeginDragging)(UIScrollView *scrollView); 76 | ///scrollView开始拖拽事件 77 | @property (nonatomic, copy) void (^zx_scrollViewDidEndDragging)(UIScrollView *scrollView, BOOL willDecelerate); 78 | #pragma mark - UITableViewDataSource & UITableViewDelegate 79 | ///tableView的DataSource 设置为当前控制器即可重写对应数据源方法 80 | @property (nonatomic, weak, nullable) id zxDataSource; 81 | ///tableView的Delegate 设置为当前控制器即可重写对应代理方法 82 | @property (nonatomic, weak, nullable) id zxDelegate; 83 | @end 84 | NS_ASSUME_NONNULL_END 85 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/Demo/View/DemoCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo/ZXSlideSelectTableView/ZXSlideSelectTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXSlideSelectTableView.m 3 | // ZXSlideSelectTableView 4 | // 5 | // Created by 李兆祥 on 2019/9/25. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXSlideSelectTableView 8 | // 基于ZXTableView https://github.com/SmileZXLee/ZXTableView 9 | 10 | #import "ZXSlideSelectTableView.h" 11 | #import "NSObject+ZXTbSafeValue.h" 12 | #import "NSObject+ZXSlideSelectTableViewKVO.h" 13 | #define ZXSelectedKey @"selected" 14 | @interface ZXSlideSelectTableView() 15 | @property(strong,nonatomic)NSIndexPath *lastSelectedIndexPath; 16 | @end 17 | @implementation ZXSlideSelectTableView 18 | 19 | #pragma mark - 初始化 20 | - (void)setZXSlideSelectTableView{ 21 | self.zx_gestureViewWidth = -1; 22 | self.zx_gestureViewLeft = -1; 23 | self.zx_gestureViewRight = -1; 24 | self.zx_gestureViewTop = -1; 25 | self.zx_gestureViewBottom = -1; 26 | UIView *gestureView = [[UIView alloc]init]; 27 | [self addSubview:gestureView]; 28 | _zx_gestureView = gestureView; 29 | UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanGesture:)]; 30 | UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; 31 | [self.zx_gestureView addGestureRecognizer:panRecognizer]; 32 | [self.zx_gestureView addGestureRecognizer:tapRecognizer]; 33 | __weak typeof(self) weakSelf = self; 34 | [self zx_slideSelectObsKey:@"contentSize" handler:^(id _Nonnull newData, id _Nonnull oldData, id _Nonnull owner) { 35 | CGFloat x = 0; 36 | CGFloat y = 0; 37 | CGFloat width = 50; 38 | CGFloat height = weakSelf.contentSize.height; 39 | if(weakSelf.zx_gestureViewFrameBlock){ 40 | CGRect gestureViewFrame = weakSelf.zx_gestureViewFrameBlock(weakSelf.frame); 41 | weakSelf.zx_gestureView.frame = CGRectMake(gestureViewFrame.origin.x,gestureViewFrame.origin.y, gestureViewFrame.size.width, weakSelf.contentSize.height - gestureViewFrame.origin.y); 42 | return; 43 | } 44 | if(weakSelf.zx_gestureViewWidth >= 0){ 45 | width = weakSelf.zx_gestureViewWidth; 46 | } 47 | if(weakSelf.zx_gestureViewLeft >= 0){ 48 | x = weakSelf.zx_gestureViewLeft; 49 | } 50 | if(weakSelf.zx_gestureViewRight >= 0){ 51 | x = weakSelf.frame.size.width - width - weakSelf.zx_gestureViewRight; 52 | } 53 | if(weakSelf.zx_gestureViewTop >= 0){ 54 | y = weakSelf.zx_gestureViewTop; 55 | height = weakSelf.contentSize.height - y; 56 | } 57 | if(weakSelf.zx_gestureViewBottom >= 0){ 58 | y = 0; 59 | height = weakSelf.contentSize.height - weakSelf.zx_gestureViewBottom; 60 | } 61 | weakSelf.zx_gestureView.frame = CGRectMake(x, y, width, height); 62 | }]; 63 | } 64 | #pragma mark - 生命周期 65 | - (instancetype)init{ 66 | if (self = [super init]) { 67 | [self setZXSlideSelectTableView]; 68 | } 69 | return self; 70 | } 71 | - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{ 72 | if(self = [super initWithFrame:frame style:style]){ 73 | [self setZXSlideSelectTableView]; 74 | } 75 | return self; 76 | } 77 | - (void)awakeFromNib{ 78 | [super awakeFromNib]; 79 | [self setZXSlideSelectTableView]; 80 | } 81 | - (void)layoutSubviews{ 82 | [super layoutSubviews]; 83 | 84 | } 85 | #pragma mark - Private 86 | #pragma mark gestureViewPan手势 87 | - (void)handlePanGesture:(UIPanGestureRecognizer *)recognizer{ 88 | CGPoint point = [recognizer locationInView:self.zx_gestureView]; 89 | [self handelGestureWithPoint:CGPointMake(point.x, point.y)]; 90 | if(recognizer.state == UIGestureRecognizerStateEnded){ 91 | self.lastSelectedIndexPath = nil; 92 | } 93 | } 94 | #pragma mark gestureViewTap手势 95 | - (void)handleTapGesture:(UITapGestureRecognizer *)recognizer{ 96 | CGPoint point = [recognizer locationInView:self]; 97 | [self handelGestureWithPoint:CGPointMake(point.x, point.y)]; 98 | if(recognizer.state == UIGestureRecognizerStateEnded){ 99 | self.lastSelectedIndexPath = nil; 100 | } 101 | } 102 | 103 | #pragma mark 处理gestureViewPan手势 104 | - (void)handelGestureWithPoint:(CGPoint)point{ 105 | NSIndexPath *selectedIndexPath = [self indexPathForRowAtPoint:point]; 106 | if((!self.lastSelectedIndexPath || ![selectedIndexPath isEqual:self.lastSelectedIndexPath]) && selectedIndexPath){ 107 | SEL sel = NSSelectorFromString(@"getModelAtIndexPath:"); 108 | IMP imp = [self methodForSelector:sel]; 109 | id (*func)(id, SEL, NSIndexPath *) = (void *)imp; 110 | id selectedModel = func(self, sel, selectedIndexPath); 111 | id selectedValue = [selectedModel zx_safeValueForKey:self.zx_modelSelectedKey]; 112 | if(!selectedValue)return; 113 | if(self.zx_disableAutoSelected){ 114 | [selectedModel zx_safeSetValue:@(1) forKey:self.zx_modelSelectedKey]; 115 | }else{ 116 | [selectedModel zx_safeSetValue:@(![selectedValue boolValue]) forKey:self.zx_modelSelectedKey]; 117 | } 118 | 119 | if(self.zx_selectedBlock){ 120 | self.zx_selectedBlock(selectedIndexPath, selectedModel); 121 | } 122 | [self reloadRowsAtIndexPaths:@[selectedIndexPath] withRowAnimation:UITableViewRowAnimationNone]; 123 | } 124 | self.lastSelectedIndexPath = selectedIndexPath; 125 | } 126 | 127 | #pragma mark - Public 128 | #pragma mark 选中所有项 129 | - (void)zx_selectAll{ 130 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 131 | __weak typeof(self) weakSelf = self; 132 | [self zx_enumModelsCallBack:^(id _Nonnull model, BOOL * _Nonnull stop) { 133 | [model zx_safeSetValue:@1 forKey:weakSelf.zx_modelSelectedKey]; 134 | }]; 135 | dispatch_async(dispatch_get_main_queue(), ^{ 136 | if(self.zx_selectedBlock){ 137 | self.zx_selectedBlock(nil,nil); 138 | } 139 | [self reloadData]; 140 | }); 141 | }); 142 | } 143 | 144 | #pragma mark 取消所有选中项 145 | - (void)zx_unSelectAll{ 146 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 147 | __weak typeof(self) weakSelf = self; 148 | [self zx_enumModelsCallBack:^(id _Nonnull model, BOOL * _Nonnull stop) { 149 | [model zx_safeSetValue:@0 forKey:weakSelf.zx_modelSelectedKey]; 150 | }]; 151 | dispatch_async(dispatch_get_main_queue(), ^{ 152 | if(self.zx_selectedBlock){ 153 | self.zx_selectedBlock(nil,nil); 154 | } 155 | [self reloadData]; 156 | }); 157 | }); 158 | } 159 | 160 | #pragma mark 遍历获取所有model 161 | - (void)zx_enumModelsCallBack:(kEnumEventHandler)result{ 162 | BOOL stop = NO; 163 | SEL sel = NSSelectorFromString(@"isMultiDatas"); 164 | IMP imp = [self methodForSelector:sel]; 165 | BOOL (*func)(id, SEL) = (void *)imp; 166 | if(func(self, sel)){ 167 | for(NSArray *sectionArr in self.zxDatas){ 168 | for (id model in sectionArr) { 169 | result(model,&stop); 170 | if(stop)break; 171 | } 172 | if(stop)break; 173 | } 174 | }else{ 175 | for (id model in self.zxDatas) { 176 | result(model,&stop); 177 | if(stop)break; 178 | } 179 | } 180 | } 181 | 182 | #pragma mark - 懒加载 183 | - (NSMutableArray *)zx_selectedArray{ 184 | _zx_selectedArray = [self getSelectedArray:YES]; 185 | return _zx_selectedArray; 186 | } 187 | 188 | - (NSMutableArray *)zx_unSelectedArray{ 189 | _zx_unSelectedArray = [self getSelectedArray:NO]; 190 | return _zx_unSelectedArray; 191 | } 192 | 193 | - (NSMutableArray *)getSelectedArray:(BOOL)selected{ 194 | if(!self.zxDatas.count){ 195 | return nil; 196 | } 197 | __weak typeof(self) weakSelf = self; 198 | NSMutableArray *tempSelectedArr = [NSMutableArray array]; 199 | [self zx_enumModelsCallBack:^(id _Nonnull model, BOOL * _Nonnull stop) { 200 | id selectedValue = [model zx_safeValueForKey:weakSelf.zx_modelSelectedKey]; 201 | if([selectedValue boolValue] && selected){ 202 | [tempSelectedArr addObject:model]; 203 | } 204 | if(![selectedValue boolValue] && !selected){ 205 | [tempSelectedArr addObject:model]; 206 | } 207 | }]; 208 | return tempSelectedArr; 209 | } 210 | 211 | - (NSString *)zx_modelSelectedKey{ 212 | if(!_zx_modelSelectedKey){ 213 | _zx_modelSelectedKey = ZXSelectedKey; 214 | } 215 | return _zx_modelSelectedKey; 216 | } 217 | 218 | #pragma mark - Dealloc 219 | - (void)dealloc{ 220 | [self removeObserver:self forKeyPath:@"contentSize"]; 221 | } 222 | @end 223 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/README.md: -------------------------------------------------------------------------------- 1 | # ZXTableView 2 | [![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/skx926/KSPhotoBrowser/master/LICENSE)  3 | [![CocoaPods](http://img.shields.io/cocoapods/v/ZXTableView.svg?style=flat)](http://cocoapods.org/?q=ZXTableView)  4 | [![CocoaPods](http://img.shields.io/cocoapods/p/ZXTableView.svg?style=flat)](http://cocoapods.org/?q=ZXTableView)  5 | [![Support](https://img.shields.io/badge/support-iOS%208.0%2B%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/)  6 | ## 安装 7 | ### 通过CocoaPods安装 8 | ```ruby 9 | pod 'ZXTableView' 10 | ``` 11 | ### 手动导入 12 | * 将ZXTableView拖入项目中。 13 | 14 | ### 导入头文件 15 | ```objective-c 16 | #import "ZXTableView.h" 17 | ``` 18 | ## 创建ZXTableView示例 19 | ### 创建一个最基础的TableView,实现点击删除按钮删除对应行 20 | * 在TableView所在的控制器中,此处定义的cell对应模型为ZXTestSingleTbModel 21 | ```objective-c 22 | //声明cell是什么类 23 | self.tableView.zx_setCellClassAtIndexPath = ^Class (NSIndexPath * indexPath) { 24 | return [ZXTestSingleTbCell class]; 25 | }; 26 | //获取cell对象并对其进行处理 27 | __weak __typeof(self) weakSelf = self; 28 | self.tableView.zx_getCellAtIndexPath = ^(NSIndexPath *indexPath, ZXTestSingleTbCell *cell, id model) { 29 | cell.delBlock = ^{ 30 | [weakSelf.tableView.zxDatas removeObjectAtIndex:indexPath.row]; 31 | [weakSelf.tableView reloadData]; 32 | }; 33 | }; 34 | //设置ZXTableView的数据,dataArr即为ZXTestSingleTbModel模型数组,如果需要多个section的效果,只需要改变dataArr即可。 35 | self.tableView.zxDatas = dataArr; 36 | ``` 37 | * 在ZXTestSingleTbCell中 38 | ```objective-c 39 | #import "ZXTestSingleTbCell.h" 40 | #import "ZXTestSingleTbModel.h" 41 | @interface ZXTestSingleTbCell() 42 | @property (weak, nonatomic) IBOutlet UIImageView *iconImgV; 43 | @property (weak, nonatomic) IBOutlet UILabel *nameLabel; 44 | @property (weak, nonatomic) IBOutlet UILabel *goodAtLabel; 45 | @property (weak, nonatomic) IBOutlet UIButton *delBtn; 46 | //若cell中有包含model的属性,则会自动将model赋值给它(如果有多个含有model字符串的属性,则赋值给第一个) 47 | @property (strong,nonatomic) ZXTestSingleTbModel *sTbModel; 48 | @end 49 | 50 | //重写model的set方法即可 51 | -(void)setSTbModel:(ZXTestSingleTbModel *)sTbModel{ 52 | _sTbModel = sTbModel; 53 | self.iconImgV.image = sTbModel.iconImg; 54 | self.nameLabel.text = sTbModel.name; 55 | self.goodAtLabel.text = sTbModel.goodAt; 56 | } 57 | ``` 58 | * 查看效果 59 | 60 | 61 | *** 62 | 63 | 64 | ### 创建一个含有HeaderView与FooterView的TableView 65 | * 在TableView所在的控制器中,此处定义的cell对应模型为ZXTestSingleTbModel 66 | ```objective-c 67 | //声明cell是什么类 68 | self.tableView.zx_setCellClassAtIndexPath = ^Class (NSIndexPath * indexPath) { 69 | return [ZXTestSingleTbCell class]; 70 | }; 71 | //声明HeaderView是什么类 72 | self.tableView.zx_setHeaderClassInSection = ^Class(NSInteger section) { 73 | return [ZXTestHFHeaderView class]; 74 | }; 75 | //声明FooterView是什么类 76 | self.tableView.zx_setFooterClassInSection = ^Class(NSInteger section) { 77 | return [ZXTestHFFooterView class]; 78 | }; 79 | //获取HeaderView对象并对其进行处理 80 | self.tableView.zx_getHeaderViewInSection = ^(NSUInteger section, ZXTestHFHeaderView *headerView, NSMutableArray *secArr) { 81 | headerView.headerLabel.text = [NSString stringWithFormat:@"HeaderView--%lu",section]; 82 | }; 83 | //获取FooterView对象并对其进行处理 84 | self.tableView.zx_getFooterViewInSection = ^(NSUInteger section, ZXTestHFFooterView *footerView, NSMutableArray *secArr) { 85 | footerView.footerLabel.text = [NSString stringWithFormat:@"FooterView--%lu",section]; 86 | }; 87 | //设置ZXTableView的数据,dataArr即为ZXTestSingleTbModel模型数组,dataArr中包含多个数组。 88 | self.tableView.zxDatas = dataArr; 89 | ``` 90 | * 在ZXTestSingleTbCell中的处理同上 91 | * 查看效果 92 | 93 | 94 | *** 95 | 96 | ### 创建动态高度的TableView 97 | * 在TableView所在的控制器中,此处定义的cell对应模型为ZXTestCHTbModel 98 | ```objective-c 99 | #pragma mark 设置TableView 100 | //声明cell是什么类 101 | self.tableView.zx_setCellClassAtIndexPath = ^Class (NSIndexPath * indexPath) { 102 | return [ZXTestCHTbCell class]; 103 | }; 104 | //声明HeaderView是什么类 105 | self.tableView.zx_setHeaderClassInSection = ^Class(NSInteger section) { 106 | return [ZXTestCHTbSpaceHeader class]; 107 | }; 108 | //设置ZXTableView的数据,dataArr即为ZXTestCHTbModel模型数组 109 | self.tableView.zxDatas = dataArr; 110 | ``` 111 | * ZXTestCHTbCelll中的处理同上 112 | 113 | * 在ZXTestCHTbModel.h中 114 | ```objective-c 115 | @interface ZXTestCHTbModel : NSObject 116 | @property (strong,nonatomic) UIImage *iconImg; 117 | @property (copy,nonatomic) NSString *name; 118 | @property (copy,nonatomic) NSString *time; 119 | @property (copy,nonatomic) NSString *comment; 120 | //此处声明了cellH,则ZXTableView会自动把cell高度赋值给cellH,更改cellH即可改变cell高度 121 | @property (assign,nonatomic) CGFloat cellH; 122 | @end 123 | ``` 124 | * 在ZXTestCHTbModel.m中 125 | ```objective-c 126 | #import "ZXTestCHTbModel.h" 127 | 128 | @implementation ZXTestCHTbModel 129 | -(void)setComment:(NSString *)comment{ 130 | _comment = comment; 131 | //此处comment所显示对应的Label距离左右边距离为15,字体大小为14,cell顶部显示个人信息的View高度为50,commentLabel距离上下均为10 132 | CGFloat commentH = [self getStrHeightWithText:comment font:[UIFont systemFontOfSize:14] viewWidth:[UIScreen mainScreen].bounds.size.width - 15 * 2]; 133 | //将计算的cell高度赋值给cellH即可 134 | self.cellH = commentH + 10 * 2 + 50; 135 | 136 | } 137 | //获取文字高度 138 | - (CGFloat)getStrHeightWithText:(NSString *)text font:(UIFont *)font viewWidth:(CGFloat)width { 139 | NSDictionary *attrs = @{NSFontAttributeName :font}; 140 | CGSize maxSize = CGSizeMake(width, MAXFLOAT); 141 | NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading; 142 | CGSize size = [text boundingRectWithSize:maxSize options:options attributes:attrs context:nil].size; 143 | return ceilf(size.height); 144 | } 145 | @end 146 | ``` 147 | * 查看效果 148 | 149 | 150 | *** 151 | 152 | ## 具体使用说明 153 | ### 如何快速使用 154 | * 创建一个tableView的步骤大致分为,声明cell,声明headerView&footerView,self.tableView.zxDatas赋值,在cell中声明一个含有“model”的属性名,重写该属性的set方法即可。 155 | * ZXTableView中的大多数方法都是zx_开头,zx_set开头代表设置tableView,例如:zx_setCellClass...即为设置(声明)cell的类是谁;zx_get开头代表从tableView中获取信息,例如zx_getCellAt...即为获取cell对象,可依据此结合下方说明快速记忆。 156 | ### cell相关 157 | * 声明cell 158 | ```objective-c 159 | self.tableView.zx_setCellClassAtIndexPath = ^Class (NSIndexPath * indexPath) { 160 | //可以根据indexPath返回不同的cell 161 | return [MyCell class]; 162 | }; 163 | ``` 164 | * 获取cell对象,对cell对象进行操作 165 | ```objective-c 166 | self.tableView.zx_getCellAtIndexPath = ^(NSIndexPath *indexPath, id cell, id model) { 167 | //这里的id cell中id可以改成自己当前的cell类名(若只有一种cell),id model中的id可以改成自己当前模型的类名(若只有一种模型) 168 | } 169 | ``` 170 | * 以上声明cell类与获取cell可以写在同一个方法中 171 | ```objective-c 172 | [self.tableView zx_setCellClassAtIndexPath:^Class(NSIndexPath *indexPath) { 173 | return [MyCell class]; 174 | } returnCell:^(NSIndexPath *indexPath, id cell, id model) { 175 | //获取cell对象 176 | }]; 177 | ``` 178 | * (非必须)设置cell高度 179 | ```objective-c 180 | //返回cell高度,ZXTableView默认会将cell高度设置为cell本身高度,也就是xib中cell的高度或纯代码中在初始化方法中设置的cell的高度,若需要改动,则可以使用以下方法实现。 181 | self.tableView.zx_setCellHAtIndexPath = ^CGFloat(NSIndexPath *indexPath) { 182 | return 70; 183 | }; 184 | ``` 185 | * 滑动编辑 186 | ```objective-c 187 | self.tableView.zx_editActionsForRowAtIndexPath = ^NSArray *(NSIndexPath *indexPath) { 188 | UITableViewRowAction *delAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) { 189 | [weakSelf.tableView.zxDatas removeObjectAtIndex:indexPath.row]; 190 | [weakSelf.tableView reloadData]; 191 | }]; 192 | //第0行不显示侧滑删除,其余行显示侧滑删除,这里只是为了演示控制侧滑删除行的情况 193 | if(indexPath.row == 0){ 194 | return nil; 195 | } 196 | return @[delAction]; 197 | }; 198 | ``` 199 | ### headerView&footerView相关,此处以headerView为例 200 | * 声明headerView 201 | ```objective-c 202 | //声明HeaderView是什么类 203 | self.tableView.zx_setHeaderClassInSection = ^Class(NSInteger section) { 204 | return [MyHeaderView class]; 205 | }; 206 | ``` 207 | * 获取headerView对象 208 | ```objective-c 209 | //获取HeaderView对象并对其进行处理 210 | self.tableView.zx_getHeaderViewInSection = ^(NSUInteger section, MyHeaderView *headerView, NSMutableArray *secArr) { 211 | headerView.headerLabel.text = [NSString stringWithFormat:@"HeaderView--%lu",section]; 212 | }; 213 | ``` 214 | * 以上声明headerView类与获取headerView可以写在同一个方法中 215 | ```objective-c 216 | [self.tableView zx_setHeaderClassInSection:^Class(NSInteger) { 217 | return [MyHeaderView cell]; 218 | } returnHeader:^(NSUInteger section, id headerView, NSMutableArray *secArr) { 219 | //获取headerView对象 220 | }]; 221 | ``` 222 | * (非必须)设置headerView高度 223 | ```objective-c 224 | //返回headerViewl高度,ZXTableView默认会将headerView高度设置为headerView本身高度,也就是xib中headerView的高度或纯代码中在初始化方法中设置的headerView的高度,若需要改动,则可以使用以下方法实现。 225 | self.tableView.zx_setHeaderHInSection = ^CGFloat(NSInteger section) { 226 | return 100; 227 | }; 228 | ``` 229 | ### tableView代理事件&偏好设置相关 230 | * 点击了某一行cell 231 | ```objective-c 232 | //点击了某一行cell 233 | self.tableView.zx_didSelectedAtIndexPath = ^(NSIndexPath *indexPath, id model, id cell) { 234 | //这里的id cell中id可以改成自己当前的cell类名(若只有一种cell),id model中的id可以改成自己当前模型的类名(若只有一种模型) 235 | 236 | }; 237 | ``` 238 | * 取消点击某一行cell 239 | ```objective-c 240 | //取消点击某一行cell 241 | self.tableView.zx_didDeSelectedAtIndexPath = ^(NSIndexPath *indexPath, id model, id cell) { 242 | //这里的id cell中id可以改成自己当前的cell类名(若只有一种cell),id model中的id可以改成自己当前模型的类名(若只有一种模型) 243 | 244 | }; 245 | ``` 246 | * 禁止系统Cell自动高度 可以有效解决tableView跳动问题,默认为YES 247 | ```objective-c 248 | self.tableView.zx_disableAutomaticDimension = YES; 249 | ``` 250 | * 无数据是否显示HeaderView,默认为YES 251 | ```objective-c 252 | self.tableView.zx_showHeaderWhenNoMsg = YES; 253 | ``` 254 | * 无数据是否显示FooterView,默认为YES 255 | ```objective-c 256 | self.tableView.zx_showFooterWhenNoMsg = YES; 257 | ``` 258 | * scrollView相关代理 259 | ```objective-c 260 | ///scrollView滚动事件 261 | @property (nonatomic, copy) void (^zx_scrollViewDidScroll)(UIScrollView *scrollView); 262 | ///scrollView缩放事件 263 | @property (nonatomic, copy) void (^zx_scrollViewDidZoom)(UIScrollView *scrollView); 264 | ///scrollView滚动到顶部事件 265 | @property (nonatomic, copy) void (^zx_scrollViewDidScrollToTop)(UIScrollView *scrollView); 266 | ///scrollView开始拖拽事件 267 | @property (nonatomic, copy) void (^zx_scrollViewWillBeginDragging)(UIScrollView *scrollView); 268 | ///scrollView开始拖拽事件 269 | @property (nonatomic, copy) void (^zx_scrollViewDidEndDragging)(UIScrollView *scrollView, BOOL willDecelerate); 270 | ``` 271 | * tableView重写数据源与代理 272 | ```objective-c 273 | //tableView的DataSource 设置为当前控制器即可重写对应数据源方法 274 | @property (nonatomic, weak, nullable) id zxDataSource; 275 | //tableView的Delegate 设置为当前控制器即可重写对应代理方法 276 | @property (nonatomic, weak, nullable) id zxDelegate; 277 | ``` 278 | *** 279 | 280 | ## Other 281 | ### 设置cell高度的几种方式 282 | * 在控制器中设置cell高度,可根据indexPath设置不同的cell高度(优先级最高,若设置了,其他高度设置方法均无效) 283 | ```objective-c 284 | self.tableView.zx_setCellHAtIndexPath = ^CGFloat(NSIndexPath *indexPath) { 285 | return 70; 286 | }; 287 | ``` 288 | * 在cell中设置cell的高度(优先级最低) 289 | ```objective-c 290 | //在cell的初始化方法中设置cell高度即可 291 | self.height = 50; 292 | ``` 293 | * 在model中设置cell的高度(优先级第二,若设置,则在cell中设置cell的高度无效) 294 | 295 | 在model.h中 296 | 297 | ```objective-c 298 | //此处声明了cellH,则ZXTableView会自动把cell高度赋值给cellH,更改cellH即可改变cell高度 299 | @property (assign,nonatomic) CGFloat cellH; 300 | ``` 301 | 在model.m中,在需要的时候更改cellH 302 | ```objective-c 303 | //例如,可以重写cellH的set方法,将cell高度在原先基础上增加10 304 | -(void)setCellH:(CGFloat)cellH{ 305 | _cellH = cellH + 10; 306 | } 307 | ``` 308 | *** 309 | 310 | ### 设置headerView&footerView高度的几种方式 311 | * 在控制器中设置headerView高度 312 | ```objective-c 313 | self.tableView.zx_setHeaderHInSection = ^CGFloat(NSInteger section) { 314 | return 100; 315 | }; 316 | ``` 317 | * 在headerView中设置headerView高度 318 | ```objective-c 319 | //在headerView的初始化方法中设置headerView高度即可 320 | self.height = 100; 321 | ``` 322 | *** 323 | 324 | ### 在cell或model中获取当前的indexPath 325 | * 在cell中获取当前的indexPath 326 | ```objective-c 327 | //在Cell.h或Cell.m中定义属性indexPath即可 328 | @property (strong, nonatomic) NSIndexPath *indexPath; 329 | ``` 330 | * 在model中获取当前的indexPath 331 | ```objective-c 332 | //在Model.h或Model.m中定义属性indexPath即可 333 | @property (strong, nonatomic) NSIndexPath *indexPath; 334 | ``` 335 | *** 336 | 337 | ### ZXTableViewConfig 338 | ```objective-c 339 | ///model默认去匹配的cell高度属性名 若不存在则动态生成cellHRunTime的属性名 340 | static NSString *const CELLH = @"cellH"; 341 | ///cell会自动赋值包含“model”的属性 342 | static NSString *const DATAMODEL = @"model"; 343 | ///model与cell的index属性,存储当前model与cell所属的indexPath 344 | static NSString *const INDEX = @"indexPath"; 345 | ///若ZXBaseTableView无法自动获取cell高度(zxdata有值即可),且用户未自定义高度,则使用默认高度 346 | static CGFloat const CELLDEFAULTH = 44; 347 | 348 | #pragma mark - TableView默认偏好配置 349 | ///无数据是否显示HeaderView,默认为YES 350 | static BOOL const ShowHeaderWhenNoMsg = YES; 351 | ///无数据是否显示FooterView,默认为YES 352 | static BOOL const ShowFooterWhenNoMsg = YES; 353 | ///禁止系统Cell自动高度 可以有效解决tableView跳动问题,默认为YES 354 | static BOOL const DisableAutomaticDimension = YES; 355 | ///分割线样式,默认为UITableViewCellSeparatorStyleNone 356 | static BOOL const DefaultSeparatorStyle = UITableViewCellSeparatorStyleNone; 357 | ``` 358 | *** 359 | 360 | ## 感谢使用,有任何问题欢迎随时issue我 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/ZXTableView/ZXTableView/ZXTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZXTableView.m 3 | // ZXTableView 4 | // 5 | // Created by 李兆祥 on 2019/3/30. 6 | // Copyright © 2019 李兆祥. All rights reserved. 7 | // https://github.com/SmileZXLee/ZXTableView 8 | 9 | #import "ZXTableView.h" 10 | #import "ZXTableViewConfig.h" 11 | #import "ZXTbGetProName.h" 12 | #import "NSObject+ZXTbSafeValue.h" 13 | #import "NSObject+ZXTbAddPro.h" 14 | @interface ZXTableView() 15 | @property(nonatomic, strong)NSMutableDictionary *zx_headerViewCacheDic; 16 | @property(nonatomic, strong)NSMutableDictionary *zx_footerViewCacheDic; 17 | @end 18 | @implementation ZXTableView 19 | #pragma mark - Perference 20 | #pragma mark 设置ZXTableView,此设置会应用到全部的ZXTableView中 21 | -(void)setZXTableView{ 22 | [self privateSetZXTableView]; 23 | } 24 | #pragma mark ZXTableView的cell,此设置会应用到全部的ZXTableView的cell中 25 | -(void)setCell{ 26 | 27 | } 28 | 29 | #pragma mark - UITableViewDataSource 30 | - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { 31 | if([self.zxDataSource respondsToSelector:@selector(cellForRowAtIndexPath:)]){ 32 | return [self.zxDataSource tableView:tableView cellForRowAtIndexPath:indexPath]; 33 | }else{ 34 | id model = [self getModelAtIndexPath:indexPath]; 35 | NSString *className = nil; 36 | Class cellClass = nil; 37 | if(self.zx_setCellClassAtIndexPath){ 38 | cellClass = self.zx_setCellClassAtIndexPath(indexPath); 39 | className = NSStringFromClass(cellClass); 40 | } 41 | BOOL isExist = [self hasNib:className]; 42 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:className]; 43 | if(!cell){ 44 | if(isExist){ 45 | cell = [[[NSBundle mainBundle]loadNibNamed:className owner:nil options:nil]lastObject]; 46 | [cell zx_safeSetValue:className forKey:@"reuseIdentifier"]; 47 | }else{ 48 | if(cellClass){ 49 | cell = [[cellClass alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:className]; 50 | }else{ 51 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:className]; 52 | cell.textLabel.text = @"Undefined Cell"; 53 | } 54 | } 55 | } 56 | if(model){ 57 | [model zx_safeSetValue:indexPath forKey:INDEX]; 58 | [cell zx_safeSetValue:indexPath forKey:INDEX]; 59 | CGFloat cellH = ((UITableViewCell *)cell).frame.size.height; 60 | if(cellH && ![[model zx_safeValueForKey:CELLH] floatValue]){ 61 | NSMutableArray *modelProNames = [ZXTbGetProName zx_getRecursionPropertyNames:model]; 62 | if([modelProNames containsObject:CELLH]){ 63 | [model zx_safeSetValue:[NSNumber numberWithFloat:cellH] forKey:CELLH]; 64 | }else{ 65 | [model setCellHRunTime:[NSNumber numberWithFloat:cellH]]; 66 | } 67 | 68 | } 69 | NSArray *cellProNames = [ZXTbGetProName zx_getRecursionPropertyNames:cell]; 70 | BOOL cellContainsModel = NO; 71 | for (NSString *proStr in cellProNames) { 72 | if([proStr.uppercaseString containsString:DATAMODEL.uppercaseString]){ 73 | [cell zx_safeSetValue:model forKey:proStr]; 74 | cellContainsModel = YES; 75 | break; 76 | } 77 | } 78 | } 79 | !self.zx_getCellAtIndexPath ? : self.zx_getCellAtIndexPath(indexPath,cell,model); 80 | [self setCell]; 81 | return cell; 82 | } 83 | } 84 | 85 | - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 86 | if([self.zxDataSource respondsToSelector:@selector(numberOfRowsInSection:)]){ 87 | return [self.zxDataSource tableView:tableView numberOfRowsInSection:section]; 88 | }else{ 89 | if(self.zx_setNumberOfRowsInSection){ 90 | return self.zx_setNumberOfRowsInSection(section); 91 | }else{ 92 | if([self isMultiDatas]){ 93 | NSArray *sectionArr = [self.zxDatas objectAtIndex:section]; 94 | if(![sectionArr isKindOfClass:[NSArray class]]){ 95 | NSAssert(NO, @"数据源内容不符合要求,多section情况数据源中必须皆为数组!"); 96 | return 0; 97 | } 98 | return sectionArr.count; 99 | }else{ 100 | return self.zxDatas.count; 101 | } 102 | } 103 | } 104 | } 105 | 106 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 107 | if([self.zxDataSource respondsToSelector:@selector(numberOfSectionsInTableView:)]){ 108 | return [self.zxDataSource numberOfSectionsInTableView:tableView]; 109 | }else{ 110 | if(self.zx_setNumberOfSectionsInTableView){ 111 | return self.zx_setNumberOfSectionsInTableView(tableView); 112 | }else{ 113 | return [self isMultiDatas] ? self.zxDatas.count : 1; 114 | } 115 | } 116 | } 117 | 118 | #pragma mark - UITableViewDelegate 119 | #pragma mark tableView 选中某一indexPath 120 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 121 | [self deselectRowAtIndexPath:indexPath animated:YES]; 122 | if([self.zxDelegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)]){ 123 | [self.zxDelegate tableView:tableView didSelectRowAtIndexPath:indexPath]; 124 | }else{ 125 | [self deselectRowAtIndexPath:indexPath animated:YES]; 126 | id model = [self getModelAtIndexPath:indexPath]; 127 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 128 | !self.zx_didSelectedAtIndexPath ? : self.zx_didSelectedAtIndexPath(indexPath,model,cell); 129 | } 130 | } 131 | #pragma mark tableView 取消选中某一indexPath 132 | -(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{ 133 | if([self.zxDelegate respondsToSelector:@selector(tableView:didDeselectRowAtIndexPath:)]){ 134 | [self.zxDelegate tableView:tableView didDeselectRowAtIndexPath:indexPath]; 135 | id model = [self getModelAtIndexPath:indexPath]; 136 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 137 | !self.zx_didDeselectedAtIndexPath ? : self.zx_didDeselectedAtIndexPath(indexPath,model,cell); 138 | } 139 | } 140 | #pragma mark tableView 滑动编辑 141 | - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ 142 | if(self.zx_editActionsForRowAtIndexPath){ 143 | return self.zx_editActionsForRowAtIndexPath(indexPath); 144 | }else{ 145 | return nil; 146 | } 147 | } 148 | #pragma mark tableView 是否可以编辑 149 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ 150 | if(self.zx_editActionsForRowAtIndexPath){ 151 | NSArray *rowActionsArr = self.zx_editActionsForRowAtIndexPath(indexPath); 152 | if(rowActionsArr && ![rowActionsArr isKindOfClass:[NSNull class]] && rowActionsArr.count){ 153 | return YES; 154 | } 155 | } 156 | return NO; 157 | } 158 | #pragma mark tableView cell高度 159 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 160 | if ([self.zxDelegate respondsToSelector:@selector(tableView:estimatedHeightForRowAtIndexPath:)]) { 161 | return UITableViewAutomaticDimension; 162 | } 163 | if([self.zxDelegate respondsToSelector:@selector(tableView:heightForRowAtIndexPath:)]){ 164 | return [self.zxDelegate tableView:tableView heightForRowAtIndexPath:indexPath]; 165 | }else{ 166 | if(self.zx_setCellHAtIndexPath){ 167 | return self.zx_setCellHAtIndexPath(indexPath); 168 | }else{ 169 | id model = [self getModelAtIndexPath:indexPath]; 170 | if(model){ 171 | CGFloat cellH = [[model zx_safeValueForKey:CELLH] floatValue]; 172 | if(cellH){ 173 | return cellH; 174 | }else{ 175 | return [[model cellHRunTime] floatValue]; 176 | } 177 | } 178 | else{ 179 | return CELLDEFAULTH; 180 | } 181 | } 182 | 183 | } 184 | } 185 | #pragma mark tableView cell 将要展示 186 | -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ 187 | !self.zx_willDisplayCell ? : self.zx_willDisplayCell(indexPath,cell); 188 | } 189 | #pragma mark tableView HeaderView & FooterView 190 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ 191 | UIView *headerView = nil; 192 | if([self.zxDelegate respondsToSelector:@selector(tableView:viewForHeaderInSection:)]){ 193 | headerView = [self.zxDelegate tableView:tableView viewForHeaderInSection:section]; 194 | 195 | }else{ 196 | if(self.zx_setHeaderClassInSection){ 197 | headerView = [self getHeaderViewInSection:section]; 198 | 199 | }else{ 200 | if(self.zx_setHeaderViewInSection){ 201 | headerView = self.zx_setHeaderViewInSection(section); 202 | } 203 | } 204 | } 205 | NSMutableArray *secArr = self.zxDatas.count ? [self isMultiDatas] ? self.zxDatas[section] : self.zxDatas : nil; 206 | !self.zx_getHeaderViewInSection ? : self.zx_getHeaderViewInSection(section,headerView,secArr); 207 | [headerView zx_safeSetValue:[NSNumber numberWithInteger:section] forKey:SECTION]; 208 | return !secArr.count ? self.zx_showHeaderWhenNoMsg ? headerView : nil : headerView; 209 | } 210 | -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{ 211 | UIView *footerView = nil; 212 | if([self.zxDelegate respondsToSelector:@selector(tableView:viewForFooterInSection:)]){ 213 | footerView = [self.zxDelegate tableView:tableView viewForFooterInSection:section]; 214 | 215 | }else{ 216 | if(self.zx_setFooterClassInSection){ 217 | footerView = [self getFooterViewInSection:section]; 218 | 219 | }else{ 220 | if(self.zx_setFooterViewInSection){ 221 | footerView = self.zx_setFooterViewInSection(section); 222 | } 223 | } 224 | } 225 | NSMutableArray *secArr = self.zxDatas.count ? [self isMultiDatas] ? self.zxDatas[section] : self.zxDatas : nil; 226 | !self.zx_getFooterViewInSection ? : self.zx_getFooterViewInSection(section,footerView,secArr); 227 | [footerView zx_safeSetValue:[NSNumber numberWithInteger:section] forKey:SECTION]; 228 | return !secArr.count ? self.zx_showFooterWhenNoMsg ? footerView : nil : footerView; 229 | } 230 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ 231 | if([self.zxDelegate respondsToSelector:@selector(tableView:heightForHeaderInSection:)]){ 232 | return [self.zxDelegate tableView:tableView heightForHeaderInSection:section]; 233 | 234 | }else{ 235 | if(self.zx_setHeaderClassInSection){ 236 | if(self.zx_setHeaderHInSection){ 237 | return self.zx_setHeaderHInSection(section); 238 | }else{ 239 | if(section < self.zxDatas.count || (self.zx_showHeaderWhenNoMsg && section == 0)){ 240 | UIView *headerView = [self getHeaderViewInSection:section]; 241 | return headerView.frame.size.height; 242 | }else{ 243 | return CGFLOAT_MIN; 244 | } 245 | } 246 | }else{ 247 | if(self.zx_setHeaderHInSection){ 248 | return self.zx_setHeaderHInSection(section); 249 | }else{ 250 | return CGFLOAT_MIN; 251 | } 252 | } 253 | } 254 | } 255 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ 256 | if([self.zxDelegate respondsToSelector:@selector(tableView:heightForFooterInSection:)]){ 257 | return [self.zxDelegate tableView:tableView heightForFooterInSection:section]; 258 | 259 | }else{ 260 | if(self.zx_setFooterClassInSection){ 261 | if(self.zx_setFooterHInSection){ 262 | return self.zx_setFooterHInSection(section); 263 | }else{ 264 | if(section < self.zxDatas.count || (self.zx_showFooterWhenNoMsg && section == 0)){ 265 | UIView *footerView = [self getFooterViewInSection:section]; 266 | return footerView.frame.size.height; 267 | }else{ 268 | return CGFLOAT_MIN; 269 | } 270 | 271 | } 272 | }else{ 273 | if(self.zx_setFooterHInSection){ 274 | return self.zx_setFooterHInSection(section); 275 | }else{ 276 | return CGFLOAT_MIN; 277 | } 278 | } 279 | } 280 | } 281 | 282 | #pragma mark - scrollView相关代理 283 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView{ 284 | if([self.zxDelegate respondsToSelector:@selector(scrollViewDidScroll:)]){ 285 | return [self.zxDelegate scrollViewDidScroll:scrollView]; 286 | 287 | }else{ 288 | if(self.zx_scrollViewDidScroll){ 289 | self.zx_scrollViewDidScroll(scrollView); 290 | } 291 | } 292 | } 293 | -(void)scrollViewDidZoom:(UIScrollView *)scrollView{ 294 | if([self.zxDelegate respondsToSelector:@selector(scrollViewDidZoom:)]){ 295 | return [self.zxDelegate scrollViewDidZoom:scrollView]; 296 | 297 | }else{ 298 | if(self.zx_scrollViewDidZoom){ 299 | self.zx_scrollViewDidZoom(scrollView); 300 | } 301 | } 302 | } 303 | -(void)scrollViewDidScrollToTop:(UIScrollView *)scrollView{ 304 | if([self.zxDelegate respondsToSelector:@selector(scrollViewDidScrollToTop:)]){ 305 | return [self.zxDelegate scrollViewDidScrollToTop:scrollView]; 306 | 307 | }else{ 308 | if(self.zx_scrollViewDidScrollToTop){ 309 | self.zx_scrollViewDidScrollToTop(scrollView); 310 | } 311 | } 312 | } 313 | -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ 314 | if([self.zxDelegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]){ 315 | return [self.zxDelegate scrollViewWillBeginDragging:scrollView]; 316 | 317 | }else{ 318 | if(self.zx_scrollViewWillBeginDragging){ 319 | self.zx_scrollViewWillBeginDragging(scrollView); 320 | } 321 | } 322 | } 323 | -(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ 324 | if([self.zxDelegate respondsToSelector:@selector(scrollViewDidEndDragging:willDecelerate:)]){ 325 | return [self.zxDelegate scrollViewDidEndDragging:scrollView willDecelerate:decelerate]; 326 | 327 | }else{ 328 | if(self.zx_scrollViewDidEndDragging){ 329 | self.zx_scrollViewDidEndDragging(scrollView,decelerate); 330 | } 331 | } 332 | } 333 | #pragma mark - Other 334 | #pragma mark 假数据填充,多section 335 | -(void)zx_fillWithSectionCount:(NSUInteger)secCount rowCount:(NSUInteger)rowCount{ 336 | NSMutableArray *datasArr = [NSMutableArray array]; 337 | for(NSUInteger i = 0; i < secCount;i++){ 338 | NSMutableArray *secArr = [NSMutableArray array]; 339 | for(NSUInteger j = 0; j < secCount;j++){ 340 | NSObject *model = [[NSObject alloc]init]; 341 | [secArr addObject:model]; 342 | } 343 | [datasArr addObject:secArr]; 344 | } 345 | self.zxDatas = datasArr; 346 | } 347 | #pragma mark 假数据填充,单section 348 | -(void)zx_fillWithRowCount:(NSUInteger)rowCount{ 349 | NSMutableArray *datasArr = [NSMutableArray array]; 350 | for(NSUInteger i = 0; i < rowCount;i++){ 351 | NSObject *model = [[NSObject alloc]init]; 352 | [datasArr addObject:model]; 353 | } 354 | self.zxDatas = datasArr; 355 | } 356 | 357 | #pragma mark - 快速构建 358 | #pragma mark 声明cell的类并返回cell对象 359 | -(void)zx_setCellClassAtIndexPath:(Class (^)(NSIndexPath * indexPath)) setCellClassCallBack returnCell:(void (^)(NSIndexPath * indexPath,id cell,id model))returnCellCallBack{ 360 | self.zx_setCellClassAtIndexPath = setCellClassCallBack; 361 | self.zx_getCellAtIndexPath = returnCellCallBack; 362 | } 363 | 364 | #pragma mark 声明HeaderView的类并返回HeaderView对象 365 | -(void)zx_setHeaderClassInSection:(Class (^)(NSInteger)) setHeaderClassCallBack returnHeader:(void (^)(NSUInteger section,id headerView,NSMutableArray *secArr))returnHeaderCallBack{ 366 | self.zx_setHeaderClassInSection = setHeaderClassCallBack; 367 | self.zx_getHeaderViewInSection = returnHeaderCallBack; 368 | } 369 | 370 | #pragma mark 声明FooterView的类并返回FooterView对象 371 | -(void)zx_setFooterClassInSection:(Class (^)(NSInteger)) setFooterClassCallBack returnHeader:(void (^)(NSUInteger section,id headerView,NSMutableArray *secArr))returnFooterCallBack{ 372 | self.zx_setFooterClassInSection = setFooterClassCallBack; 373 | self.zx_getFooterViewInSection = returnFooterCallBack; 374 | } 375 | #pragma mark - Private 376 | #pragma mark 判断是否是多个section的情况 377 | -(BOOL)isMultiDatas{ 378 | return self.zxDatas.count && [[self.zxDatas objectAtIndex:0] isKindOfClass:[NSArray class]]; 379 | } 380 | #pragma mark 获取对应indexPath的model 381 | -(instancetype)getModelAtIndexPath:(NSIndexPath *)indexPath{ 382 | id model = nil;; 383 | if([self isMultiDatas]){ 384 | if(indexPath.section < self.zxDatas.count){ 385 | NSArray *sectionArr = self.zxDatas[indexPath.section]; 386 | if(indexPath.row < sectionArr.count){ 387 | model = sectionArr[indexPath.row]; 388 | }else{ 389 | NSAssert(NO, [NSString stringWithFormat:@"数据源异常,请检查数据源!"]); 390 | } 391 | }else{ 392 | NSAssert(NO, [NSString stringWithFormat:@"数据源异常,请检查数据源!"]); 393 | } 394 | }else{ 395 | if(indexPath.row < self.zxDatas.count){ 396 | model = self.zxDatas[indexPath.row]; 397 | }else{ 398 | NSAssert(NO, [NSString stringWithFormat:@"数据源异常,请检查数据源!"]); 399 | } 400 | } 401 | return model; 402 | } 403 | 404 | #pragma mark 判断对应类名的xib是否存在 405 | -(BOOL)hasNib:(NSString *)clsName{ 406 | return [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.nib",[[NSBundle mainBundle]resourcePath],clsName]]; 407 | } 408 | 409 | #pragma mark 根据section获取headerView 410 | -(UIView *)getHeaderViewInSection:(NSUInteger)section{ 411 | NSString *sectionStr = [NSString stringWithFormat:@"%lu",section]; 412 | if(self.zx_keepStaticHeaderView && [self.zx_headerViewCacheDic.allKeys containsObject:sectionStr]){ 413 | return self.zx_headerViewCacheDic[sectionStr]; 414 | } 415 | Class headerClass = self.zx_setHeaderClassInSection(section); 416 | BOOL isExist = [self hasNib:NSStringFromClass(headerClass)]; 417 | UIView *headerView = nil; 418 | if(isExist){ 419 | headerView = [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass(headerClass) owner:nil options:nil]lastObject]; 420 | }else{ 421 | headerView = [[headerClass alloc]init]; 422 | } 423 | if(self.zx_keepStaticHeaderView){ 424 | [self.zx_headerViewCacheDic setObject:headerView forKey:sectionStr]; 425 | } 426 | return headerView; 427 | } 428 | 429 | #pragma mark 根据section获取footerView 430 | -(UIView *)getFooterViewInSection:(NSUInteger)section{ 431 | NSString *sectionStr = [NSString stringWithFormat:@"%lu",section]; 432 | if(self.zx_keepStaticFooterView && [self.zx_footerViewCacheDic.allKeys containsObject:sectionStr]){ 433 | return self.zx_footerViewCacheDic[sectionStr]; 434 | } 435 | Class footerClass = self.zx_setFooterClassInSection(section); 436 | BOOL isExist = [self hasNib:NSStringFromClass(footerClass)]; 437 | UIView *footerView = nil; 438 | if(isExist){ 439 | footerView = [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass(footerClass) owner:nil options:nil]lastObject]; 440 | }else{ 441 | footerView = [[footerClass alloc]init]; 442 | } 443 | if(self.zx_keepStaticFooterView){ 444 | [self.zx_footerViewCacheDic setObject:footerView forKey:sectionStr]; 445 | } 446 | return footerView; 447 | } 448 | 449 | #pragma mark zx_disableAutomaticDimension Setter 450 | -(void)setZx_disableAutomaticDimension:(BOOL)zx_disableAutomaticDimension{ 451 | _zx_disableAutomaticDimension = zx_disableAutomaticDimension; 452 | if(zx_disableAutomaticDimension){ 453 | self.estimatedRowHeight = 0; 454 | self.estimatedSectionHeaderHeight = 0; 455 | self.estimatedSectionFooterHeight = 0; 456 | } 457 | } 458 | 459 | #pragma mark zxDatas Setter 460 | -(void)setZxDatas:(NSMutableArray *)zxDatas{ 461 | _zxDatas = zxDatas; 462 | if(zxDatas){ 463 | NSAssert([_zxDatas isKindOfClass:[NSArray class]], @"zxDatas必须为数组"); 464 | } 465 | [self reloadData]; 466 | } 467 | 468 | #pragma mark ZXTableView默认初始化设置 469 | -(void)privateSetZXTableView{ 470 | self.zxDatas = [NSMutableArray array]; 471 | self.delegate = self; 472 | self.dataSource = self; 473 | self.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, CGFLOAT_MIN)]; 474 | self.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, CGFLOAT_MIN)]; 475 | 476 | self.separatorStyle = DefaultSeparatorStyle; 477 | self.zx_disableAutomaticDimension = DisableAutomaticDimension; 478 | self.zx_showHeaderWhenNoMsg = ShowHeaderWhenNoMsg; 479 | self.zx_showFooterWhenNoMsg = ShowFooterWhenNoMsg; 480 | self.zx_keepStaticHeaderView = KeepStaticHeaderView; 481 | self.zx_keepStaticFooterView = KeepStaticFooterView; 482 | } 483 | #pragma mark - 生命周期 484 | -(instancetype)init{ 485 | if (self = [super init]) { 486 | [self setZXTableView]; 487 | } 488 | return self; 489 | } 490 | -(instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{ 491 | if(self = [super initWithFrame:frame style:style]){ 492 | [self setZXTableView]; 493 | } 494 | return self; 495 | } 496 | -(void)awakeFromNib{ 497 | [super awakeFromNib]; 498 | [self setZXTableView]; 499 | } 500 | -(void)dealloc{ 501 | self.delegate = nil; 502 | self.dataSource = nil; 503 | } 504 | #pragma mark - Private 505 | #pragma mark 重写reload方法 506 | -(void)reloadData{ 507 | if(!self.zx_keepStaticHeaderView){ 508 | [self.zx_headerViewCacheDic removeAllObjects]; 509 | } 510 | if(!self.zx_keepStaticFooterView){ 511 | [self.zx_footerViewCacheDic removeAllObjects]; 512 | } 513 | [super reloadData]; 514 | } 515 | #pragma mark - 懒加载 516 | -(NSMutableDictionary *)zx_headerViewCacheDic{ 517 | if(!_zx_headerViewCacheDic){ 518 | _zx_headerViewCacheDic = [NSMutableDictionary dictionary]; 519 | } 520 | return _zx_headerViewCacheDic; 521 | } 522 | 523 | -(NSMutableDictionary *)zx_footerViewCacheDic{ 524 | if(!_zx_footerViewCacheDic){ 525 | _zx_footerViewCacheDic = [NSMutableDictionary dictionary]; 526 | } 527 | return _zx_footerViewCacheDic; 528 | } 529 | 530 | @end 531 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0937940E3D7635AEB2C58CEAAE8096AD /* NSObject+ZXTbSafeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C9E8111323FF7373EFCF543EF3787773 /* NSObject+ZXTbSafeValue.h */; settings = {ATTRIBUTES = (Project, ); }; }; 11 | 228C2354108C27CB740D9E860833AD98 /* NSObject+ZXTbAddPro.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF68D236A730A72AAE51111C85DA13D /* NSObject+ZXTbAddPro.h */; settings = {ATTRIBUTES = (Project, ); }; }; 12 | 257D2EA7E2565EB03F31AC59EB21B803 /* ZXTableView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C3235947D1543498088EE766E3C8DB7D /* ZXTableView-dummy.m */; }; 13 | 363719D3F397603B76821101F25FBC20 /* ZXTbGetProName.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CFBD2A259073D98895B20CF935A55C1 /* ZXTbGetProName.m */; }; 14 | 6ED2C69F7204B99F339297D84FD60928 /* ZXTableViewConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 35140B7E16D8944E07D3A418D1E88A4F /* ZXTableViewConfig.h */; settings = {ATTRIBUTES = (Project, ); }; }; 15 | 7F39AEDD1F145A9D5A3FE09D3384279F /* ZXTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2617C22244476DC0622D510E2911BC7 /* ZXTableView.m */; }; 16 | B1A7E3D0BE614F9AA191267BB16DBD7B /* ZXTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 45684E12BA1AD91E474F9A87F8028A66 /* ZXTableView.h */; settings = {ATTRIBUTES = (Project, ); }; }; 17 | D49A45482A980265E4224CDCF2B317A9 /* NSObject+ZXTbSafeValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 48E15A49460DDCDEF912CAA7726008C5 /* NSObject+ZXTbSafeValue.m */; }; 18 | D6306BD586A1294E2045572C2D879876 /* Pods-ZXSlideSelectTableViewDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AA354789E1E1BC6C1B25521D6A7FE58 /* Pods-ZXSlideSelectTableViewDemo-dummy.m */; }; 19 | DDA2431D6A348FFF36035CF4C3700DD7 /* ZXTbGetProName.h in Headers */ = {isa = PBXBuildFile; fileRef = B679C9A636143F80C554EF92615AFE12 /* ZXTbGetProName.h */; settings = {ATTRIBUTES = (Project, ); }; }; 20 | F5698D5931E997984DBA812BE254D43A /* NSObject+ZXTbAddPro.m in Sources */ = {isa = PBXBuildFile; fileRef = 34716C9AFF9CACEA16205130B2AB60A6 /* NSObject+ZXTbAddPro.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 2F647888C438423844F2496FD41BCE2C /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 050F4C788DEBE9C4285E7CB30B85816D; 29 | remoteInfo = ZXTableView; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 0EFFF4F5FABC28C7CF703FB4899FA946 /* ZXTableView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXTableView.xcconfig; sourceTree = ""; }; 35 | 1C563F3F24B192A4C2B36AF2644868C4 /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ZXSlideSelectTableViewDemo.release.xcconfig"; sourceTree = ""; }; 36 | 34716C9AFF9CACEA16205130B2AB60A6 /* NSObject+ZXTbAddPro.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+ZXTbAddPro.m"; path = "ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.m"; sourceTree = ""; }; 37 | 35140B7E16D8944E07D3A418D1E88A4F /* ZXTableViewConfig.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZXTableViewConfig.h; path = ZXTableView/ZXTableViewConfig.h; sourceTree = ""; }; 38 | 45684E12BA1AD91E474F9A87F8028A66 /* ZXTableView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZXTableView.h; path = ZXTableView/ZXTableView.h; sourceTree = ""; }; 39 | 48E15A49460DDCDEF912CAA7726008C5 /* NSObject+ZXTbSafeValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+ZXTbSafeValue.m"; path = "ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.m"; sourceTree = ""; }; 40 | 5AA354789E1E1BC6C1B25521D6A7FE58 /* Pods-ZXSlideSelectTableViewDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ZXSlideSelectTableViewDemo-dummy.m"; sourceTree = ""; }; 41 | 5CFBD2A259073D98895B20CF935A55C1 /* ZXTbGetProName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ZXTbGetProName.m; path = ZXTableView/ZXTbExtension/ZXTbGetProName.m; sourceTree = ""; }; 42 | 66FDA546E875DC215A520CDB138C912F /* ZXTableView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXTableView-prefix.pch"; sourceTree = ""; }; 43 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 44 | A2617C22244476DC0622D510E2911BC7 /* ZXTableView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ZXTableView.m; path = ZXTableView/ZXTableView.m; sourceTree = ""; }; 45 | B2A141F3509A3C810B2F87DF1805BD5C /* Pods-ZXSlideSelectTableViewDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ZXSlideSelectTableViewDemo-acknowledgements.plist"; sourceTree = ""; }; 46 | B3F8D1BCB6E499EC9C9E79166D791642 /* libZXTableView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libZXTableView.a; path = libZXTableView.a; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | B679C9A636143F80C554EF92615AFE12 /* ZXTbGetProName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZXTbGetProName.h; path = ZXTableView/ZXTbExtension/ZXTbGetProName.h; sourceTree = ""; }; 48 | C3235947D1543498088EE766E3C8DB7D /* ZXTableView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ZXTableView-dummy.m"; sourceTree = ""; }; 49 | C331E241D3D83897BA6215B8A0CD52A9 /* libPods-ZXSlideSelectTableViewDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-ZXSlideSelectTableViewDemo.a"; path = "libPods-ZXSlideSelectTableViewDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | C9E8111323FF7373EFCF543EF3787773 /* NSObject+ZXTbSafeValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+ZXTbSafeValue.h"; path = "ZXTableView/ZXTbExtension/NSObject+ZXTbSafeValue.h"; sourceTree = ""; }; 51 | DD3E260A40B98728F23CA8B0DBCF53B9 /* Pods-ZXSlideSelectTableViewDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ZXSlideSelectTableViewDemo-acknowledgements.markdown"; sourceTree = ""; }; 52 | DDF68D236A730A72AAE51111C85DA13D /* NSObject+ZXTbAddPro.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+ZXTbAddPro.h"; path = "ZXTableView/ZXTbExtension/NSObject+ZXTbAddPro.h"; sourceTree = ""; }; 53 | E23D6673FA1D6F28F4DE43DCDF74455A /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ZXSlideSelectTableViewDemo.debug.xcconfig"; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 0772622536D02B8CDA36F2146FF5F110 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 6E2BAB7C33F3BC8C621BF11355AC302F /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 048EB907F73695BA480B02BC80D24A7E /* Support Files */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 0EFFF4F5FABC28C7CF703FB4899FA946 /* ZXTableView.xcconfig */, 78 | C3235947D1543498088EE766E3C8DB7D /* ZXTableView-dummy.m */, 79 | 66FDA546E875DC215A520CDB138C912F /* ZXTableView-prefix.pch */, 80 | ); 81 | name = "Support Files"; 82 | path = "../Target Support Files/ZXTableView"; 83 | sourceTree = ""; 84 | }; 85 | 05595BD31B4EA127C318B94E8B956EDB /* ZXTableView */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | DDF68D236A730A72AAE51111C85DA13D /* NSObject+ZXTbAddPro.h */, 89 | 34716C9AFF9CACEA16205130B2AB60A6 /* NSObject+ZXTbAddPro.m */, 90 | C9E8111323FF7373EFCF543EF3787773 /* NSObject+ZXTbSafeValue.h */, 91 | 48E15A49460DDCDEF912CAA7726008C5 /* NSObject+ZXTbSafeValue.m */, 92 | 45684E12BA1AD91E474F9A87F8028A66 /* ZXTableView.h */, 93 | A2617C22244476DC0622D510E2911BC7 /* ZXTableView.m */, 94 | 35140B7E16D8944E07D3A418D1E88A4F /* ZXTableViewConfig.h */, 95 | B679C9A636143F80C554EF92615AFE12 /* ZXTbGetProName.h */, 96 | 5CFBD2A259073D98895B20CF935A55C1 /* ZXTbGetProName.m */, 97 | 048EB907F73695BA480B02BC80D24A7E /* Support Files */, 98 | ); 99 | name = ZXTableView; 100 | path = ZXTableView; 101 | sourceTree = ""; 102 | }; 103 | 7B10C544C8616826C182014690BAB0A8 /* Pods */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 05595BD31B4EA127C318B94E8B956EDB /* ZXTableView */, 107 | ); 108 | name = Pods; 109 | sourceTree = ""; 110 | }; 111 | 9D263F89BF290BFC65A43D0787E77D75 /* Targets Support Files */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | E236B77E236C4BC2681DED7032AAFADE /* Pods-ZXSlideSelectTableViewDemo */, 115 | ); 116 | name = "Targets Support Files"; 117 | sourceTree = ""; 118 | }; 119 | CF1408CF629C7361332E53B88F7BD30C = { 120 | isa = PBXGroup; 121 | children = ( 122 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 123 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, 124 | 7B10C544C8616826C182014690BAB0A8 /* Pods */, 125 | DF92897B09ADC9BEA201233C57550E71 /* Products */, 126 | 9D263F89BF290BFC65A43D0787E77D75 /* Targets Support Files */, 127 | ); 128 | sourceTree = ""; 129 | }; 130 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | ); 134 | name = Frameworks; 135 | sourceTree = ""; 136 | }; 137 | DF92897B09ADC9BEA201233C57550E71 /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C331E241D3D83897BA6215B8A0CD52A9 /* libPods-ZXSlideSelectTableViewDemo.a */, 141 | B3F8D1BCB6E499EC9C9E79166D791642 /* libZXTableView.a */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | E236B77E236C4BC2681DED7032AAFADE /* Pods-ZXSlideSelectTableViewDemo */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | DD3E260A40B98728F23CA8B0DBCF53B9 /* Pods-ZXSlideSelectTableViewDemo-acknowledgements.markdown */, 150 | B2A141F3509A3C810B2F87DF1805BD5C /* Pods-ZXSlideSelectTableViewDemo-acknowledgements.plist */, 151 | 5AA354789E1E1BC6C1B25521D6A7FE58 /* Pods-ZXSlideSelectTableViewDemo-dummy.m */, 152 | E23D6673FA1D6F28F4DE43DCDF74455A /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */, 153 | 1C563F3F24B192A4C2B36AF2644868C4 /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */, 154 | ); 155 | name = "Pods-ZXSlideSelectTableViewDemo"; 156 | path = "Target Support Files/Pods-ZXSlideSelectTableViewDemo"; 157 | sourceTree = ""; 158 | }; 159 | /* End PBXGroup section */ 160 | 161 | /* Begin PBXHeadersBuildPhase section */ 162 | AA7845408A1DFE3EC8CCD984ACB4F1BB /* Headers */ = { 163 | isa = PBXHeadersBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | 228C2354108C27CB740D9E860833AD98 /* NSObject+ZXTbAddPro.h in Headers */, 167 | 0937940E3D7635AEB2C58CEAAE8096AD /* NSObject+ZXTbSafeValue.h in Headers */, 168 | B1A7E3D0BE614F9AA191267BB16DBD7B /* ZXTableView.h in Headers */, 169 | 6ED2C69F7204B99F339297D84FD60928 /* ZXTableViewConfig.h in Headers */, 170 | DDA2431D6A348FFF36035CF4C3700DD7 /* ZXTbGetProName.h in Headers */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | D115EE668DA07C0281699577C8422A14 /* Headers */ = { 175 | isa = PBXHeadersBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXHeadersBuildPhase section */ 182 | 183 | /* Begin PBXNativeTarget section */ 184 | 050F4C788DEBE9C4285E7CB30B85816D /* ZXTableView */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 2257DCE48AF414221A31C35E81374699 /* Build configuration list for PBXNativeTarget "ZXTableView" */; 187 | buildPhases = ( 188 | AA7845408A1DFE3EC8CCD984ACB4F1BB /* Headers */, 189 | 2A2A3462F716336A02C322F8AA27DBC0 /* Sources */, 190 | 0772622536D02B8CDA36F2146FF5F110 /* Frameworks */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | ); 196 | name = ZXTableView; 197 | productName = ZXTableView; 198 | productReference = B3F8D1BCB6E499EC9C9E79166D791642 /* libZXTableView.a */; 199 | productType = "com.apple.product-type.library.static"; 200 | }; 201 | B658D2AC644FA6D30AF1A47B0629D1EB /* Pods-ZXSlideSelectTableViewDemo */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = BC4F7B6C825B82CAF5005A211A5B3669 /* Build configuration list for PBXNativeTarget "Pods-ZXSlideSelectTableViewDemo" */; 204 | buildPhases = ( 205 | D115EE668DA07C0281699577C8422A14 /* Headers */, 206 | 18A47CF38900E8F33D57ADEC0A90FE16 /* Sources */, 207 | 6E2BAB7C33F3BC8C621BF11355AC302F /* Frameworks */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | 7CC418AE99520E689BD4617496A2F704 /* PBXTargetDependency */, 213 | ); 214 | name = "Pods-ZXSlideSelectTableViewDemo"; 215 | productName = "Pods-ZXSlideSelectTableViewDemo"; 216 | productReference = C331E241D3D83897BA6215B8A0CD52A9 /* libPods-ZXSlideSelectTableViewDemo.a */; 217 | productType = "com.apple.product-type.library.static"; 218 | }; 219 | /* End PBXNativeTarget section */ 220 | 221 | /* Begin PBXProject section */ 222 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 223 | isa = PBXProject; 224 | attributes = { 225 | LastSwiftUpdateCheck = 0930; 226 | LastUpgradeCheck = 0930; 227 | }; 228 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 229 | compatibilityVersion = "Xcode 9.3"; 230 | developmentRegion = English; 231 | hasScannedForEncodings = 0; 232 | knownRegions = ( 233 | en, 234 | ); 235 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 236 | productRefGroup = DF92897B09ADC9BEA201233C57550E71 /* Products */; 237 | projectDirPath = ""; 238 | projectRoot = ""; 239 | targets = ( 240 | B658D2AC644FA6D30AF1A47B0629D1EB /* Pods-ZXSlideSelectTableViewDemo */, 241 | 050F4C788DEBE9C4285E7CB30B85816D /* ZXTableView */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXSourcesBuildPhase section */ 247 | 18A47CF38900E8F33D57ADEC0A90FE16 /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | D6306BD586A1294E2045572C2D879876 /* Pods-ZXSlideSelectTableViewDemo-dummy.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | 2A2A3462F716336A02C322F8AA27DBC0 /* Sources */ = { 256 | isa = PBXSourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | F5698D5931E997984DBA812BE254D43A /* NSObject+ZXTbAddPro.m in Sources */, 260 | D49A45482A980265E4224CDCF2B317A9 /* NSObject+ZXTbSafeValue.m in Sources */, 261 | 257D2EA7E2565EB03F31AC59EB21B803 /* ZXTableView-dummy.m in Sources */, 262 | 7F39AEDD1F145A9D5A3FE09D3384279F /* ZXTableView.m in Sources */, 263 | 363719D3F397603B76821101F25FBC20 /* ZXTbGetProName.m in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | /* End PBXSourcesBuildPhase section */ 268 | 269 | /* Begin PBXTargetDependency section */ 270 | 7CC418AE99520E689BD4617496A2F704 /* PBXTargetDependency */ = { 271 | isa = PBXTargetDependency; 272 | name = ZXTableView; 273 | target = 050F4C788DEBE9C4285E7CB30B85816D /* ZXTableView */; 274 | targetProxy = 2F647888C438423844F2496FD41BCE2C /* PBXContainerItemProxy */; 275 | }; 276 | /* End PBXTargetDependency section */ 277 | 278 | /* Begin XCBuildConfiguration section */ 279 | 05DF210AC65EBB0E593AAF976B2C2177 /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_ANALYZER_NONNULL = YES; 284 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 285 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 286 | CLANG_CXX_LIBRARY = "libc++"; 287 | CLANG_ENABLE_MODULES = YES; 288 | CLANG_ENABLE_OBJC_ARC = YES; 289 | CLANG_ENABLE_OBJC_WEAK = YES; 290 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 291 | CLANG_WARN_BOOL_CONVERSION = YES; 292 | CLANG_WARN_COMMA = YES; 293 | CLANG_WARN_CONSTANT_CONVERSION = YES; 294 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INFINITE_RECURSION = YES; 300 | CLANG_WARN_INT_CONVERSION = YES; 301 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 303 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 305 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 306 | CLANG_WARN_STRICT_PROTOTYPES = YES; 307 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 308 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 309 | CLANG_WARN_UNREACHABLE_CODE = YES; 310 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 311 | COPY_PHASE_STRIP = NO; 312 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 313 | ENABLE_NS_ASSERTIONS = NO; 314 | ENABLE_STRICT_OBJC_MSGSEND = YES; 315 | GCC_C_LANGUAGE_STANDARD = gnu11; 316 | GCC_NO_COMMON_BLOCKS = YES; 317 | GCC_PREPROCESSOR_DEFINITIONS = ( 318 | "POD_CONFIGURATION_RELEASE=1", 319 | "$(inherited)", 320 | ); 321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 323 | GCC_WARN_UNDECLARED_SELECTOR = YES; 324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 325 | GCC_WARN_UNUSED_FUNCTION = YES; 326 | GCC_WARN_UNUSED_VARIABLE = YES; 327 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 328 | MTL_ENABLE_DEBUG_INFO = NO; 329 | MTL_FAST_MATH = YES; 330 | PRODUCT_NAME = "$(TARGET_NAME)"; 331 | STRIP_INSTALLED_PRODUCT = NO; 332 | SWIFT_COMPILATION_MODE = wholemodule; 333 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 334 | SWIFT_VERSION = 4.2; 335 | SYMROOT = "${SRCROOT}/../build"; 336 | }; 337 | name = Release; 338 | }; 339 | 1664AEE266B12EDF4AA0D0D99648B3D8 /* Release */ = { 340 | isa = XCBuildConfiguration; 341 | baseConfigurationReference = 0EFFF4F5FABC28C7CF703FB4899FA946 /* ZXTableView.xcconfig */; 342 | buildSettings = { 343 | CODE_SIGN_IDENTITY = "iPhone Developer"; 344 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 346 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 347 | GCC_PREFIX_HEADER = "Target Support Files/ZXTableView/ZXTableView-prefix.pch"; 348 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 349 | OTHER_LDFLAGS = ""; 350 | OTHER_LIBTOOLFLAGS = ""; 351 | PRIVATE_HEADERS_FOLDER_PATH = ""; 352 | PRODUCT_MODULE_NAME = ZXTableView; 353 | PRODUCT_NAME = ZXTableView; 354 | PUBLIC_HEADERS_FOLDER_PATH = ""; 355 | SDKROOT = iphoneos; 356 | SKIP_INSTALL = YES; 357 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | VALIDATE_PRODUCT = YES; 360 | }; 361 | name = Release; 362 | }; 363 | 421ECB1396280A8D83853C3DDBED1700 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | CLANG_ANALYZER_NONNULL = YES; 368 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 370 | CLANG_CXX_LIBRARY = "libc++"; 371 | CLANG_ENABLE_MODULES = YES; 372 | CLANG_ENABLE_OBJC_ARC = YES; 373 | CLANG_ENABLE_OBJC_WEAK = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 381 | CLANG_WARN_EMPTY_BODY = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INFINITE_RECURSION = YES; 384 | CLANG_WARN_INT_CONVERSION = YES; 385 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 386 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 387 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 390 | CLANG_WARN_STRICT_PROTOTYPES = YES; 391 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 392 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | COPY_PHASE_STRIP = NO; 396 | DEBUG_INFORMATION_FORMAT = dwarf; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | ENABLE_TESTABILITY = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu11; 400 | GCC_DYNAMIC_NO_PIC = NO; 401 | GCC_NO_COMMON_BLOCKS = YES; 402 | GCC_OPTIMIZATION_LEVEL = 0; 403 | GCC_PREPROCESSOR_DEFINITIONS = ( 404 | "POD_CONFIGURATION_DEBUG=1", 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 415 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 416 | MTL_FAST_MATH = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | PRODUCT_NAME = "$(TARGET_NAME)"; 419 | STRIP_INSTALLED_PRODUCT = NO; 420 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 4.2; 423 | SYMROOT = "${SRCROOT}/../build"; 424 | }; 425 | name = Debug; 426 | }; 427 | 733AA6B7A24EA76439391A10C5720D05 /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 0EFFF4F5FABC28C7CF703FB4899FA946 /* ZXTableView.xcconfig */; 430 | buildSettings = { 431 | CODE_SIGN_IDENTITY = "iPhone Developer"; 432 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 433 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 434 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 435 | GCC_PREFIX_HEADER = "Target Support Files/ZXTableView/ZXTableView-prefix.pch"; 436 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 437 | OTHER_LDFLAGS = ""; 438 | OTHER_LIBTOOLFLAGS = ""; 439 | PRIVATE_HEADERS_FOLDER_PATH = ""; 440 | PRODUCT_MODULE_NAME = ZXTableView; 441 | PRODUCT_NAME = ZXTableView; 442 | PUBLIC_HEADERS_FOLDER_PATH = ""; 443 | SDKROOT = iphoneos; 444 | SKIP_INSTALL = YES; 445 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 446 | TARGETED_DEVICE_FAMILY = "1,2"; 447 | }; 448 | name = Debug; 449 | }; 450 | 74FBDB5FAA63428938312D2A4BDC9283 /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | baseConfigurationReference = 1C563F3F24B192A4C2B36AF2644868C4 /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */; 453 | buildSettings = { 454 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 455 | CODE_SIGN_IDENTITY = "iPhone Developer"; 456 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 458 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 459 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 460 | MACH_O_TYPE = staticlib; 461 | OTHER_LDFLAGS = ""; 462 | OTHER_LIBTOOLFLAGS = ""; 463 | PODS_ROOT = "$(SRCROOT)"; 464 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 465 | SDKROOT = iphoneos; 466 | SKIP_INSTALL = YES; 467 | TARGETED_DEVICE_FAMILY = "1,2"; 468 | VALIDATE_PRODUCT = YES; 469 | }; 470 | name = Release; 471 | }; 472 | FD180D59A3F7239D0AB13012031E529F /* Debug */ = { 473 | isa = XCBuildConfiguration; 474 | baseConfigurationReference = E23D6673FA1D6F28F4DE43DCDF74455A /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */; 475 | buildSettings = { 476 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 477 | CODE_SIGN_IDENTITY = "iPhone Developer"; 478 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 480 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 481 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 482 | MACH_O_TYPE = staticlib; 483 | OTHER_LDFLAGS = ""; 484 | OTHER_LIBTOOLFLAGS = ""; 485 | PODS_ROOT = "$(SRCROOT)"; 486 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 487 | SDKROOT = iphoneos; 488 | SKIP_INSTALL = YES; 489 | TARGETED_DEVICE_FAMILY = "1,2"; 490 | }; 491 | name = Debug; 492 | }; 493 | /* End XCBuildConfiguration section */ 494 | 495 | /* Begin XCConfigurationList section */ 496 | 2257DCE48AF414221A31C35E81374699 /* Build configuration list for PBXNativeTarget "ZXTableView" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 733AA6B7A24EA76439391A10C5720D05 /* Debug */, 500 | 1664AEE266B12EDF4AA0D0D99648B3D8 /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 421ECB1396280A8D83853C3DDBED1700 /* Debug */, 509 | 05DF210AC65EBB0E593AAF976B2C2177 /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | BC4F7B6C825B82CAF5005A211A5B3669 /* Build configuration list for PBXNativeTarget "Pods-ZXSlideSelectTableViewDemo" */ = { 515 | isa = XCConfigurationList; 516 | buildConfigurations = ( 517 | FD180D59A3F7239D0AB13012031E529F /* Debug */, 518 | 74FBDB5FAA63428938312D2A4BDC9283 /* Release */, 519 | ); 520 | defaultConfigurationIsVisible = 0; 521 | defaultConfigurationName = Release; 522 | }; 523 | /* End XCConfigurationList section */ 524 | }; 525 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 526 | } 527 | -------------------------------------------------------------------------------- /ZXSlideSelectTableViewDemo/ZXSlideSelectTableViewDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7448B36C233B427A0089EEA7 /* DemoHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7448B36B233B42790089EEA7 /* DemoHeaderView.m */; }; 11 | 7448B36E233B42900089EEA7 /* DemoHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7448B36D233B42900089EEA7 /* DemoHeaderView.xib */; }; 12 | 7448B371233B53BC0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.m in Sources */ = {isa = PBXBuildFile; fileRef = 7448B370233B53BB0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.m */; }; 13 | 74DAE58A233B13640045D242 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE589233B13640045D242 /* AppDelegate.m */; }; 14 | 74DAE592233B13680045D242 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 74DAE591233B13680045D242 /* Assets.xcassets */; }; 15 | 74DAE595233B13680045D242 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74DAE593233B13680045D242 /* LaunchScreen.storyboard */; }; 16 | 74DAE598233B13680045D242 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE597233B13680045D242 /* main.m */; }; 17 | 74DAE5A2233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE5A1233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.m */; }; 18 | 74DAE5BE233B16840045D242 /* ZXSlideSelectTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE5BD233B16840045D242 /* ZXSlideSelectTableView.m */; }; 19 | 74DAE5C3233B17A10045D242 /* DemoVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE5C1233B17A10045D242 /* DemoVC.m */; }; 20 | 74DAE5C4233B17A10045D242 /* DemoVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 74DAE5C2233B17A10045D242 /* DemoVC.xib */; }; 21 | 74DAE5C9233B185F0045D242 /* DemoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE5C8233B185F0045D242 /* DemoModel.m */; }; 22 | 74DAE5CD233B18800045D242 /* DemoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 74DAE5CB233B18800045D242 /* DemoCell.m */; }; 23 | 74DAE5CE233B18800045D242 /* DemoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 74DAE5CC233B18800045D242 /* DemoCell.xib */; }; 24 | FDEB3D86C02A0188A8A3E598 /* libPods-ZXSlideSelectTableViewDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 540152B64D8F9DF9536E131F /* libPods-ZXSlideSelectTableViewDemo.a */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 74DAE59E233B13690045D242 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 74DAE57D233B13640045D242 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 74DAE584233B13640045D242; 33 | remoteInfo = ZXSlideSelectTableViewDemo; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 0E42F5D6BE1F7C8A5F3F2831 /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZXSlideSelectTableViewDemo.debug.xcconfig"; path = "Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo.debug.xcconfig"; sourceTree = ""; }; 39 | 540152B64D8F9DF9536E131F /* libPods-ZXSlideSelectTableViewDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZXSlideSelectTableViewDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 7448B36A233B42790089EEA7 /* DemoHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoHeaderView.h; sourceTree = ""; }; 41 | 7448B36B233B42790089EEA7 /* DemoHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoHeaderView.m; sourceTree = ""; }; 42 | 7448B36D233B42900089EEA7 /* DemoHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoHeaderView.xib; sourceTree = ""; }; 43 | 7448B36F233B53BB0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+ZXSlideSelectTableViewKVO.h"; sourceTree = ""; }; 44 | 7448B370233B53BB0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+ZXSlideSelectTableViewKVO.m"; sourceTree = ""; }; 45 | 74DAE585233B13640045D242 /* ZXSlideSelectTableViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZXSlideSelectTableViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 74DAE588233B13640045D242 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | 74DAE589233B13640045D242 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | 74DAE591233B13680045D242 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 74DAE594233B13680045D242 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 74DAE596233B13680045D242 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 74DAE597233B13680045D242 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 74DAE59D233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZXSlideSelectTableViewDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 74DAE5A1233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZXSlideSelectTableViewDemoUITests.m; sourceTree = ""; }; 54 | 74DAE5A3233B13690045D242 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 74DAE5BC233B16840045D242 /* ZXSlideSelectTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXSlideSelectTableView.h; sourceTree = ""; }; 56 | 74DAE5BD233B16840045D242 /* ZXSlideSelectTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZXSlideSelectTableView.m; sourceTree = ""; }; 57 | 74DAE5C0233B17A10045D242 /* DemoVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoVC.h; sourceTree = ""; }; 58 | 74DAE5C1233B17A10045D242 /* DemoVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoVC.m; sourceTree = ""; }; 59 | 74DAE5C2233B17A10045D242 /* DemoVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoVC.xib; sourceTree = ""; }; 60 | 74DAE5C7233B185F0045D242 /* DemoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoModel.h; sourceTree = ""; }; 61 | 74DAE5C8233B185F0045D242 /* DemoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoModel.m; sourceTree = ""; }; 62 | 74DAE5CA233B18800045D242 /* DemoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoCell.h; sourceTree = ""; }; 63 | 74DAE5CB233B18800045D242 /* DemoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoCell.m; sourceTree = ""; }; 64 | 74DAE5CC233B18800045D242 /* DemoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoCell.xib; sourceTree = ""; }; 65 | E2094BA631D63B51ABD26C2B /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZXSlideSelectTableViewDemo.release.xcconfig"; path = "Target Support Files/Pods-ZXSlideSelectTableViewDemo/Pods-ZXSlideSelectTableViewDemo.release.xcconfig"; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | 74DAE582233B13640045D242 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | FDEB3D86C02A0188A8A3E598 /* libPods-ZXSlideSelectTableViewDemo.a in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | 74DAE59A233B13690045D242 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXFrameworksBuildPhase section */ 85 | 86 | /* Begin PBXGroup section */ 87 | 24A60C795BB07EE49F799A02 /* Pods */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 0E42F5D6BE1F7C8A5F3F2831 /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */, 91 | E2094BA631D63B51ABD26C2B /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */, 92 | ); 93 | path = Pods; 94 | sourceTree = ""; 95 | }; 96 | 74DAE57C233B13640045D242 = { 97 | isa = PBXGroup; 98 | children = ( 99 | 74DAE587233B13640045D242 /* ZXSlideSelectTableViewDemo */, 100 | 74DAE5A0233B13690045D242 /* ZXSlideSelectTableViewDemoUITests */, 101 | 74DAE586233B13640045D242 /* Products */, 102 | 24A60C795BB07EE49F799A02 /* Pods */, 103 | C038336A9E22BE16EC4CA97E /* Frameworks */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 74DAE586233B13640045D242 /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 74DAE585233B13640045D242 /* ZXSlideSelectTableViewDemo.app */, 111 | 74DAE59D233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 74DAE587233B13640045D242 /* ZXSlideSelectTableViewDemo */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 74DAE5AC233B15F00045D242 /* ZXSlideSelectTableView */, 120 | 74DAE5BF233B17870045D242 /* Demo */, 121 | 74DAE588233B13640045D242 /* AppDelegate.h */, 122 | 74DAE589233B13640045D242 /* AppDelegate.m */, 123 | 74DAE591233B13680045D242 /* Assets.xcassets */, 124 | 74DAE593233B13680045D242 /* LaunchScreen.storyboard */, 125 | 74DAE596233B13680045D242 /* Info.plist */, 126 | 74DAE597233B13680045D242 /* main.m */, 127 | ); 128 | path = ZXSlideSelectTableViewDemo; 129 | sourceTree = ""; 130 | }; 131 | 74DAE5A0233B13690045D242 /* ZXSlideSelectTableViewDemoUITests */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 74DAE5A1233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.m */, 135 | 74DAE5A3233B13690045D242 /* Info.plist */, 136 | ); 137 | path = ZXSlideSelectTableViewDemoUITests; 138 | sourceTree = ""; 139 | }; 140 | 74DAE5AC233B15F00045D242 /* ZXSlideSelectTableView */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 74DAE5BC233B16840045D242 /* ZXSlideSelectTableView.h */, 144 | 74DAE5BD233B16840045D242 /* ZXSlideSelectTableView.m */, 145 | 7448B36F233B53BB0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.h */, 146 | 7448B370233B53BB0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.m */, 147 | ); 148 | path = ZXSlideSelectTableView; 149 | sourceTree = ""; 150 | }; 151 | 74DAE5BF233B17870045D242 /* Demo */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 74DAE5C6233B184F0045D242 /* Model */, 155 | 74DAE5C5233B18490045D242 /* View */, 156 | 74DAE5C0233B17A10045D242 /* DemoVC.h */, 157 | 74DAE5C1233B17A10045D242 /* DemoVC.m */, 158 | 74DAE5C2233B17A10045D242 /* DemoVC.xib */, 159 | ); 160 | path = Demo; 161 | sourceTree = ""; 162 | }; 163 | 74DAE5C5233B18490045D242 /* View */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 74DAE5CA233B18800045D242 /* DemoCell.h */, 167 | 74DAE5CB233B18800045D242 /* DemoCell.m */, 168 | 74DAE5CC233B18800045D242 /* DemoCell.xib */, 169 | 7448B36A233B42790089EEA7 /* DemoHeaderView.h */, 170 | 7448B36B233B42790089EEA7 /* DemoHeaderView.m */, 171 | 7448B36D233B42900089EEA7 /* DemoHeaderView.xib */, 172 | ); 173 | path = View; 174 | sourceTree = ""; 175 | }; 176 | 74DAE5C6233B184F0045D242 /* Model */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 74DAE5C7233B185F0045D242 /* DemoModel.h */, 180 | 74DAE5C8233B185F0045D242 /* DemoModel.m */, 181 | ); 182 | path = Model; 183 | sourceTree = ""; 184 | }; 185 | C038336A9E22BE16EC4CA97E /* Frameworks */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | 540152B64D8F9DF9536E131F /* libPods-ZXSlideSelectTableViewDemo.a */, 189 | ); 190 | name = Frameworks; 191 | sourceTree = ""; 192 | }; 193 | /* End PBXGroup section */ 194 | 195 | /* Begin PBXNativeTarget section */ 196 | 74DAE584233B13640045D242 /* ZXSlideSelectTableViewDemo */ = { 197 | isa = PBXNativeTarget; 198 | buildConfigurationList = 74DAE5A6233B13690045D242 /* Build configuration list for PBXNativeTarget "ZXSlideSelectTableViewDemo" */; 199 | buildPhases = ( 200 | 9541C4EB8D839121DFA2ECC4 /* [CP] Check Pods Manifest.lock */, 201 | 74DAE581233B13640045D242 /* Sources */, 202 | 74DAE582233B13640045D242 /* Frameworks */, 203 | 74DAE583233B13640045D242 /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | ); 209 | name = ZXSlideSelectTableViewDemo; 210 | productName = ZXSlideSelectTableViewDemo; 211 | productReference = 74DAE585233B13640045D242 /* ZXSlideSelectTableViewDemo.app */; 212 | productType = "com.apple.product-type.application"; 213 | }; 214 | 74DAE59C233B13690045D242 /* ZXSlideSelectTableViewDemoUITests */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = 74DAE5A9233B13690045D242 /* Build configuration list for PBXNativeTarget "ZXSlideSelectTableViewDemoUITests" */; 217 | buildPhases = ( 218 | 74DAE599233B13690045D242 /* Sources */, 219 | 74DAE59A233B13690045D242 /* Frameworks */, 220 | 74DAE59B233B13690045D242 /* Resources */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | 74DAE59F233B13690045D242 /* PBXTargetDependency */, 226 | ); 227 | name = ZXSlideSelectTableViewDemoUITests; 228 | productName = ZXSlideSelectTableViewDemoUITests; 229 | productReference = 74DAE59D233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.xctest */; 230 | productType = "com.apple.product-type.bundle.ui-testing"; 231 | }; 232 | /* End PBXNativeTarget section */ 233 | 234 | /* Begin PBXProject section */ 235 | 74DAE57D233B13640045D242 /* Project object */ = { 236 | isa = PBXProject; 237 | attributes = { 238 | LastUpgradeCheck = 1020; 239 | ORGANIZATIONNAME = "李兆祥"; 240 | TargetAttributes = { 241 | 74DAE584233B13640045D242 = { 242 | CreatedOnToolsVersion = 10.2; 243 | }; 244 | 74DAE59C233B13690045D242 = { 245 | CreatedOnToolsVersion = 10.2; 246 | TestTargetID = 74DAE584233B13640045D242; 247 | }; 248 | }; 249 | }; 250 | buildConfigurationList = 74DAE580233B13640045D242 /* Build configuration list for PBXProject "ZXSlideSelectTableViewDemo" */; 251 | compatibilityVersion = "Xcode 9.3"; 252 | developmentRegion = en; 253 | hasScannedForEncodings = 0; 254 | knownRegions = ( 255 | en, 256 | Base, 257 | ); 258 | mainGroup = 74DAE57C233B13640045D242; 259 | productRefGroup = 74DAE586233B13640045D242 /* Products */; 260 | projectDirPath = ""; 261 | projectRoot = ""; 262 | targets = ( 263 | 74DAE584233B13640045D242 /* ZXSlideSelectTableViewDemo */, 264 | 74DAE59C233B13690045D242 /* ZXSlideSelectTableViewDemoUITests */, 265 | ); 266 | }; 267 | /* End PBXProject section */ 268 | 269 | /* Begin PBXResourcesBuildPhase section */ 270 | 74DAE583233B13640045D242 /* Resources */ = { 271 | isa = PBXResourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | 74DAE5CE233B18800045D242 /* DemoCell.xib in Resources */, 275 | 74DAE595233B13680045D242 /* LaunchScreen.storyboard in Resources */, 276 | 74DAE5C4233B17A10045D242 /* DemoVC.xib in Resources */, 277 | 74DAE592233B13680045D242 /* Assets.xcassets in Resources */, 278 | 7448B36E233B42900089EEA7 /* DemoHeaderView.xib in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 74DAE59B233B13690045D242 /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXResourcesBuildPhase section */ 290 | 291 | /* Begin PBXShellScriptBuildPhase section */ 292 | 9541C4EB8D839121DFA2ECC4 /* [CP] Check Pods Manifest.lock */ = { 293 | isa = PBXShellScriptBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | ); 297 | inputFileListPaths = ( 298 | ); 299 | inputPaths = ( 300 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 301 | "${PODS_ROOT}/Manifest.lock", 302 | ); 303 | name = "[CP] Check Pods Manifest.lock"; 304 | outputFileListPaths = ( 305 | ); 306 | outputPaths = ( 307 | "$(DERIVED_FILE_DIR)/Pods-ZXSlideSelectTableViewDemo-checkManifestLockResult.txt", 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | shellPath = /bin/sh; 311 | 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"; 312 | showEnvVarsInLog = 0; 313 | }; 314 | /* End PBXShellScriptBuildPhase section */ 315 | 316 | /* Begin PBXSourcesBuildPhase section */ 317 | 74DAE581233B13640045D242 /* Sources */ = { 318 | isa = PBXSourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | 7448B371233B53BC0089EEA7 /* NSObject+ZXSlideSelectTableViewKVO.m in Sources */, 322 | 74DAE5BE233B16840045D242 /* ZXSlideSelectTableView.m in Sources */, 323 | 74DAE5CD233B18800045D242 /* DemoCell.m in Sources */, 324 | 74DAE5C3233B17A10045D242 /* DemoVC.m in Sources */, 325 | 7448B36C233B427A0089EEA7 /* DemoHeaderView.m in Sources */, 326 | 74DAE598233B13680045D242 /* main.m in Sources */, 327 | 74DAE5C9233B185F0045D242 /* DemoModel.m in Sources */, 328 | 74DAE58A233B13640045D242 /* AppDelegate.m in Sources */, 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | }; 332 | 74DAE599233B13690045D242 /* Sources */ = { 333 | isa = PBXSourcesBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | 74DAE5A2233B13690045D242 /* ZXSlideSelectTableViewDemoUITests.m in Sources */, 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | /* End PBXSourcesBuildPhase section */ 341 | 342 | /* Begin PBXTargetDependency section */ 343 | 74DAE59F233B13690045D242 /* PBXTargetDependency */ = { 344 | isa = PBXTargetDependency; 345 | target = 74DAE584233B13640045D242 /* ZXSlideSelectTableViewDemo */; 346 | targetProxy = 74DAE59E233B13690045D242 /* PBXContainerItemProxy */; 347 | }; 348 | /* End PBXTargetDependency section */ 349 | 350 | /* Begin PBXVariantGroup section */ 351 | 74DAE593233B13680045D242 /* LaunchScreen.storyboard */ = { 352 | isa = PBXVariantGroup; 353 | children = ( 354 | 74DAE594233B13680045D242 /* Base */, 355 | ); 356 | name = LaunchScreen.storyboard; 357 | sourceTree = ""; 358 | }; 359 | /* End PBXVariantGroup section */ 360 | 361 | /* Begin XCBuildConfiguration section */ 362 | 74DAE5A4233B13690045D242 /* Debug */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | ALWAYS_SEARCH_USER_PATHS = NO; 366 | CLANG_ANALYZER_NONNULL = YES; 367 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 369 | CLANG_CXX_LIBRARY = "libc++"; 370 | CLANG_ENABLE_MODULES = YES; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_ENABLE_OBJC_WEAK = YES; 373 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 374 | CLANG_WARN_BOOL_CONVERSION = YES; 375 | CLANG_WARN_COMMA = YES; 376 | CLANG_WARN_CONSTANT_CONVERSION = YES; 377 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 379 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INFINITE_RECURSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 389 | CLANG_WARN_STRICT_PROTOTYPES = YES; 390 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 391 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 392 | CLANG_WARN_UNREACHABLE_CODE = YES; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | CODE_SIGN_IDENTITY = "iPhone Developer"; 395 | COPY_PHASE_STRIP = NO; 396 | DEBUG_INFORMATION_FORMAT = dwarf; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | ENABLE_TESTABILITY = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu11; 400 | GCC_DYNAMIC_NO_PIC = NO; 401 | GCC_NO_COMMON_BLOCKS = YES; 402 | GCC_OPTIMIZATION_LEVEL = 0; 403 | GCC_PREPROCESSOR_DEFINITIONS = ( 404 | "DEBUG=1", 405 | "$(inherited)", 406 | ); 407 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 408 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 409 | GCC_WARN_UNDECLARED_SELECTOR = YES; 410 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 411 | GCC_WARN_UNUSED_FUNCTION = YES; 412 | GCC_WARN_UNUSED_VARIABLE = YES; 413 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 414 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 415 | MTL_FAST_MATH = YES; 416 | ONLY_ACTIVE_ARCH = YES; 417 | SDKROOT = iphoneos; 418 | }; 419 | name = Debug; 420 | }; 421 | 74DAE5A5233B13690045D242 /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_SEARCH_USER_PATHS = NO; 425 | CLANG_ANALYZER_NONNULL = YES; 426 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 427 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 428 | CLANG_CXX_LIBRARY = "libc++"; 429 | CLANG_ENABLE_MODULES = YES; 430 | CLANG_ENABLE_OBJC_ARC = YES; 431 | CLANG_ENABLE_OBJC_WEAK = YES; 432 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_COMMA = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 444 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 445 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 446 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 448 | CLANG_WARN_STRICT_PROTOTYPES = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 451 | CLANG_WARN_UNREACHABLE_CODE = YES; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | CODE_SIGN_IDENTITY = "iPhone Developer"; 454 | COPY_PHASE_STRIP = NO; 455 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 456 | ENABLE_NS_ASSERTIONS = NO; 457 | ENABLE_STRICT_OBJC_MSGSEND = YES; 458 | GCC_C_LANGUAGE_STANDARD = gnu11; 459 | GCC_NO_COMMON_BLOCKS = YES; 460 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 461 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 462 | GCC_WARN_UNDECLARED_SELECTOR = YES; 463 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 464 | GCC_WARN_UNUSED_FUNCTION = YES; 465 | GCC_WARN_UNUSED_VARIABLE = YES; 466 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 467 | MTL_ENABLE_DEBUG_INFO = NO; 468 | MTL_FAST_MATH = YES; 469 | SDKROOT = iphoneos; 470 | VALIDATE_PRODUCT = YES; 471 | }; 472 | name = Release; 473 | }; 474 | 74DAE5A7233B13690045D242 /* Debug */ = { 475 | isa = XCBuildConfiguration; 476 | baseConfigurationReference = 0E42F5D6BE1F7C8A5F3F2831 /* Pods-ZXSlideSelectTableViewDemo.debug.xcconfig */; 477 | buildSettings = { 478 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 479 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 480 | CODE_SIGN_STYLE = Automatic; 481 | DEVELOPMENT_TEAM = X3UA5897T2; 482 | INFOPLIST_FILE = ZXSlideSelectTableViewDemo/Info.plist; 483 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 484 | LD_RUNPATH_SEARCH_PATHS = ( 485 | "$(inherited)", 486 | "@executable_path/Frameworks", 487 | ); 488 | PRODUCT_BUNDLE_IDENTIFIER = cn.zxlee.ZXSlideSelectTableViewDemo; 489 | PRODUCT_NAME = "$(TARGET_NAME)"; 490 | TARGETED_DEVICE_FAMILY = "1,2"; 491 | }; 492 | name = Debug; 493 | }; 494 | 74DAE5A8233B13690045D242 /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | baseConfigurationReference = E2094BA631D63B51ABD26C2B /* Pods-ZXSlideSelectTableViewDemo.release.xcconfig */; 497 | buildSettings = { 498 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 499 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; 500 | CODE_SIGN_STYLE = Automatic; 501 | DEVELOPMENT_TEAM = X3UA5897T2; 502 | INFOPLIST_FILE = ZXSlideSelectTableViewDemo/Info.plist; 503 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 504 | LD_RUNPATH_SEARCH_PATHS = ( 505 | "$(inherited)", 506 | "@executable_path/Frameworks", 507 | ); 508 | PRODUCT_BUNDLE_IDENTIFIER = cn.zxlee.ZXSlideSelectTableViewDemo; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | TARGETED_DEVICE_FAMILY = "1,2"; 511 | }; 512 | name = Release; 513 | }; 514 | 74DAE5AA233B13690045D242 /* Debug */ = { 515 | isa = XCBuildConfiguration; 516 | buildSettings = { 517 | CODE_SIGN_STYLE = Automatic; 518 | DEVELOPMENT_TEAM = X3UA5897T2; 519 | INFOPLIST_FILE = ZXSlideSelectTableViewDemoUITests/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = ( 521 | "$(inherited)", 522 | "@executable_path/Frameworks", 523 | "@loader_path/Frameworks", 524 | ); 525 | PRODUCT_BUNDLE_IDENTIFIER = cn.zxlee.ZXSlideSelectTableViewDemoUITests; 526 | PRODUCT_NAME = "$(TARGET_NAME)"; 527 | TARGETED_DEVICE_FAMILY = "1,2"; 528 | TEST_TARGET_NAME = ZXSlideSelectTableViewDemo; 529 | }; 530 | name = Debug; 531 | }; 532 | 74DAE5AB233B13690045D242 /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | CODE_SIGN_STYLE = Automatic; 536 | DEVELOPMENT_TEAM = X3UA5897T2; 537 | INFOPLIST_FILE = ZXSlideSelectTableViewDemoUITests/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = ( 539 | "$(inherited)", 540 | "@executable_path/Frameworks", 541 | "@loader_path/Frameworks", 542 | ); 543 | PRODUCT_BUNDLE_IDENTIFIER = cn.zxlee.ZXSlideSelectTableViewDemoUITests; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | TARGETED_DEVICE_FAMILY = "1,2"; 546 | TEST_TARGET_NAME = ZXSlideSelectTableViewDemo; 547 | }; 548 | name = Release; 549 | }; 550 | /* End XCBuildConfiguration section */ 551 | 552 | /* Begin XCConfigurationList section */ 553 | 74DAE580233B13640045D242 /* Build configuration list for PBXProject "ZXSlideSelectTableViewDemo" */ = { 554 | isa = XCConfigurationList; 555 | buildConfigurations = ( 556 | 74DAE5A4233B13690045D242 /* Debug */, 557 | 74DAE5A5233B13690045D242 /* Release */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | 74DAE5A6233B13690045D242 /* Build configuration list for PBXNativeTarget "ZXSlideSelectTableViewDemo" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 74DAE5A7233B13690045D242 /* Debug */, 566 | 74DAE5A8233B13690045D242 /* Release */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | 74DAE5A9233B13690045D242 /* Build configuration list for PBXNativeTarget "ZXSlideSelectTableViewDemoUITests" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 74DAE5AA233B13690045D242 /* Debug */, 575 | 74DAE5AB233B13690045D242 /* Release */, 576 | ); 577 | defaultConfigurationIsVisible = 0; 578 | defaultConfigurationName = Release; 579 | }; 580 | /* End XCConfigurationList section */ 581 | }; 582 | rootObject = 74DAE57D233B13640045D242 /* Project object */; 583 | } 584 | --------------------------------------------------------------------------------