├── .gitignore ├── Example ├── ExampleSnapshot │ ├── snapshot.gif │ └── snapshot_fast.gif ├── JJTableViewExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── JJTableViewExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── Alipay_edit_icon │ │ ├── Contents.json │ │ ├── app_add.imageset │ │ │ ├── Contents.json │ │ │ └── app_add@2x.png │ │ ├── app_del.imageset │ │ │ ├── Contents.json │ │ │ └── app_del@2x.png │ │ └── app_ok.imageset │ │ │ ├── Contents.json │ │ │ └── app_ok@2x.png │ ├── Alipay_icon │ │ ├── Contents.json │ │ ├── icon_01.imageset │ │ │ ├── Contents.json │ │ │ └── icon_01@2x.png │ │ ├── icon_02.imageset │ │ │ ├── Contents.json │ │ │ └── icon_02@2x.png │ │ ├── icon_03.imageset │ │ │ ├── Contents.json │ │ │ └── icon_03@2x.png │ │ ├── icon_04.imageset │ │ │ ├── Contents.json │ │ │ └── icon_04@2x.png │ │ ├── icon_05.imageset │ │ │ ├── Contents.json │ │ │ └── icon_05@2x.png │ │ ├── icon_06.imageset │ │ │ ├── Contents.json │ │ │ └── icon_06@2x.png │ │ ├── icon_07.imageset │ │ │ ├── Contents.json │ │ │ └── icon_07@2x.png │ │ ├── icon_08.imageset │ │ │ ├── Contents.json │ │ │ └── icon_08@2x.png │ │ ├── icon_09.imageset │ │ │ ├── Contents.json │ │ │ └── icon_09@2x.png │ │ ├── icon_10.imageset │ │ │ ├── Contents.json │ │ │ └── icon_10@2x.png │ │ ├── icon_11.imageset │ │ │ ├── Contents.json │ │ │ └── icon_11@2x.png │ │ ├── icon_12.imageset │ │ │ ├── Contents.json │ │ │ └── icon_12@2x.png │ │ ├── icon_13.imageset │ │ │ ├── Contents.json │ │ │ └── icon_13@2x.png │ │ ├── icon_14.imageset │ │ │ ├── Contents.json │ │ │ └── icon_14@2x.png │ │ ├── icon_15.imageset │ │ │ ├── Contents.json │ │ │ └── icon_15@2x.png │ │ ├── icon_16.imageset │ │ │ ├── Contents.json │ │ │ └── icon_16@2x.png │ │ ├── icon_17.imageset │ │ │ ├── Contents.json │ │ │ └── icon_17@2x.png │ │ ├── icon_18.imageset │ │ │ ├── Contents.json │ │ │ └── icon_18@2x.png │ │ ├── icon_19.imageset │ │ │ ├── Contents.json │ │ │ └── icon_19@2x.png │ │ ├── icon_20.imageset │ │ │ ├── Contents.json │ │ │ └── icon_20@2x.png │ │ ├── icon_21.imageset │ │ │ ├── Contents.json │ │ │ └── icon_21@2x.png │ │ ├── icon_22.imageset │ │ │ ├── Contents.json │ │ │ └── icon_22@2x.png │ │ ├── icon_23.imageset │ │ │ ├── Contents.json │ │ │ └── icon_23@2x.png │ │ ├── icon_24.imageset │ │ │ ├── Contents.json │ │ │ └── icon_24@2x.png │ │ ├── icon_25.imageset │ │ │ ├── Contents.json │ │ │ └── icon_25@2x.png │ │ ├── icon_26.imageset │ │ │ ├── Contents.json │ │ │ └── icon_26@2x.png │ │ ├── icon_27.imageset │ │ │ ├── Contents.json │ │ │ └── icon_27@2x.png │ │ ├── icon_28.imageset │ │ │ ├── Contents.json │ │ │ └── icon_28@2x.png │ │ ├── icon_29.imageset │ │ │ ├── Contents.json │ │ │ └── icon_29@2x.png │ │ ├── icon_30.imageset │ │ │ ├── Contents.json │ │ │ └── icon_30@2x.png │ │ ├── icon_31.imageset │ │ │ ├── Contents.json │ │ │ └── icon_31@2x.png │ │ ├── icon_32.imageset │ │ │ ├── Contents.json │ │ │ └── icon_32@2x.png │ │ ├── icon_33.imageset │ │ │ ├── Contents.json │ │ │ └── icon_33@2x.png │ │ ├── icon_34.imageset │ │ │ ├── Contents.json │ │ │ └── icon_34@2x.png │ │ ├── icon_35.imageset │ │ │ ├── Contents.json │ │ │ └── icon_35@2x.png │ │ ├── icon_36.imageset │ │ │ ├── Contents.json │ │ │ └── icon_36@2x.png │ │ ├── icon_37.imageset │ │ │ ├── Contents.json │ │ │ └── icon_37@2x.png │ │ ├── icon_38.imageset │ │ │ ├── Contents.json │ │ │ └── icon_38@2x.png │ │ ├── icon_39.imageset │ │ │ ├── Contents.json │ │ │ └── icon_39@2x.png │ │ ├── icon_40.imageset │ │ │ ├── Contents.json │ │ │ └── icon_40@2x.png │ │ ├── icon_41.imageset │ │ │ ├── Contents.json │ │ │ └── icon_41@2x.png │ │ ├── icon_42.imageset │ │ │ ├── Contents.json │ │ │ └── icon_42@2x.png │ │ ├── icon_43.imageset │ │ │ ├── Contents.json │ │ │ └── icon_43@2x.png │ │ ├── icon_44.imageset │ │ │ ├── Contents.json │ │ │ └── icon_44@2x.png │ │ ├── icon_45.imageset │ │ │ ├── Contents.json │ │ │ └── icon_45@2x.png │ │ ├── icon_46.imageset │ │ │ ├── Contents.json │ │ │ └── icon_46@2x.png │ │ ├── icon_47.imageset │ │ │ ├── Contents.json │ │ │ └── icon_47@2x.png │ │ ├── icon_48.imageset │ │ │ ├── Contents.json │ │ │ └── icon_48@2x.png │ │ └── icon_49.imageset │ │ │ ├── Contents.json │ │ │ └── icon_49@2x.png │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Base │ ├── JJBaseCell.h │ ├── JJBaseCell.m │ ├── JJBaseCell.xib │ ├── JJBaseModel.h │ ├── JJBaseModel.m │ ├── JJBaseViewController.h │ └── JJBaseViewController.m │ ├── Common │ ├── JJClickEffectView.h │ ├── JJClickEffectView.m │ ├── JJLayoutConstraintHairline.h │ └── JJLayoutConstraintHairline.m │ ├── ImitationExample │ ├── Headline │ │ ├── JJHeadlineCell.h │ │ ├── JJHeadlineCell.m │ │ ├── JJHeadlineCell.xib │ │ ├── JJHeadlineHeader.h │ │ ├── JJHeadlineHeader.m │ │ ├── JJHeadlineHeader.xib │ │ ├── JJHeadlineMenuController.h │ │ ├── JJHeadlineMenuController.m │ │ └── headline_menu.plist │ ├── NewAlipay │ │ ├── JJNewAlipayCell.h │ │ ├── JJNewAlipayCell.m │ │ ├── JJNewAlipayCell.xib │ │ ├── JJNewAlipayController.h │ │ ├── JJNewAlipayController.m │ │ ├── JJNewAlipaySeparatorHeader.h │ │ ├── JJNewAlipaySeparatorHeader.m │ │ ├── JJNewAlipaySeparatorHeader.xib │ │ └── new_alipay_menu.plist │ └── OldAlipay │ │ ├── JJOldAlipayBannerHeader.h │ │ ├── JJOldAlipayBannerHeader.m │ │ ├── JJOldAlipayBannerHeader.xib │ │ ├── JJOldAlipayCell.h │ │ ├── JJOldAlipayCell.m │ │ ├── JJOldAlipayCell.xib │ │ ├── JJOldAlipayController.m │ │ ├── JjOldAlipayController.h │ │ └── old_alipay_menu.plist │ ├── Info.plist │ ├── StyleExample │ ├── Horizental │ │ ├── JJHorizentalController.h │ │ ├── JJHorizentalController.m │ │ └── horizental.plist │ ├── PagingHorizental │ │ ├── JJPagingHorizentalController.h │ │ ├── JJPagingHorizentalController.m │ │ └── paging_horizental.plist │ └── Vartical │ │ ├── JJVarticalController.h │ │ ├── JJVarticalController.m │ │ └── vartical.plist │ └── main.m ├── JJTableView.podspec ├── JJTableView ├── JJTableView.h └── JJTableView.m ├── LICENSE └── README.md /.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 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | 62 | .DS_Store -------------------------------------------------------------------------------- /Example/ExampleSnapshot/snapshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/ExampleSnapshot/snapshot.gif -------------------------------------------------------------------------------- /Example/ExampleSnapshot/snapshot_fast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/ExampleSnapshot/snapshot_fast.gif -------------------------------------------------------------------------------- /Example/JJTableViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/26. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/26. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_add.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "app_add@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_add.imageset/app_add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_add.imageset/app_add@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_del.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "app_del@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_del.imageset/app_del@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_del.imageset/app_del@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_ok.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "app_ok@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_ok.imageset/app_ok@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_edit_icon/app_ok.imageset/app_ok@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_01.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_01@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_01.imageset/icon_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_01.imageset/icon_01@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_02.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_02@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_02.imageset/icon_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_02.imageset/icon_02@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_03.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_03@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_03.imageset/icon_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_03.imageset/icon_03@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_04.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_04@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_04.imageset/icon_04@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_04.imageset/icon_04@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_05.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_05@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_05.imageset/icon_05@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_05.imageset/icon_05@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_06.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_06@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_06.imageset/icon_06@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_06.imageset/icon_06@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_07.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_07@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_07.imageset/icon_07@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_07.imageset/icon_07@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_08.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_08@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_08.imageset/icon_08@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_08.imageset/icon_08@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_09.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_09@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_09.imageset/icon_09@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_09.imageset/icon_09@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_10@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_10.imageset/icon_10@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_10.imageset/icon_10@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_11@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_11.imageset/icon_11@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_11.imageset/icon_11@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_12@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_12.imageset/icon_12@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_12.imageset/icon_12@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_13@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_13.imageset/icon_13@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_13.imageset/icon_13@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_14@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_14.imageset/icon_14@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_14.imageset/icon_14@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_15@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_15.imageset/icon_15@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_15.imageset/icon_15@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_16.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_16@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_16.imageset/icon_16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_16.imageset/icon_16@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_17.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_17@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_17.imageset/icon_17@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_17.imageset/icon_17@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_18.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_18@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_18.imageset/icon_18@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_18.imageset/icon_18@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_19.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_19@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_19.imageset/icon_19@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_19.imageset/icon_19@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_20.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_20@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_20.imageset/icon_20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_20.imageset/icon_20@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_21.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_21@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_21.imageset/icon_21@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_21.imageset/icon_21@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_22.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_22@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_22.imageset/icon_22@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_22.imageset/icon_22@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_23.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_23@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_23.imageset/icon_23@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_23.imageset/icon_23@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_24.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_24@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_24.imageset/icon_24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_24.imageset/icon_24@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_25.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_25@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_25.imageset/icon_25@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_25.imageset/icon_25@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_26.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_26@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_26.imageset/icon_26@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_26.imageset/icon_26@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_27.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_27@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_27.imageset/icon_27@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_27.imageset/icon_27@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_28.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_28@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_28.imageset/icon_28@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_28.imageset/icon_28@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_29.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_29@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_29.imageset/icon_29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_29.imageset/icon_29@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_30.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_30@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_30.imageset/icon_30@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_30.imageset/icon_30@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_31.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_31@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_31.imageset/icon_31@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_31.imageset/icon_31@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_32.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_32@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_32.imageset/icon_32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_32.imageset/icon_32@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_33.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_33@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_33.imageset/icon_33@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_33.imageset/icon_33@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_34.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_34@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_34.imageset/icon_34@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_34.imageset/icon_34@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_35.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_35@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_35.imageset/icon_35@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_35.imageset/icon_35@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_36.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_36@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_36.imageset/icon_36@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_36.imageset/icon_36@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_37.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_37@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_37.imageset/icon_37@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_37.imageset/icon_37@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_38.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_38@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_38.imageset/icon_38@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_38.imageset/icon_38@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_39.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_39@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_39.imageset/icon_39@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_39.imageset/icon_39@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_40.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_40@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_40.imageset/icon_40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_40.imageset/icon_40@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_41.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_41@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_41.imageset/icon_41@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_41.imageset/icon_41@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_42.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_42@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_42.imageset/icon_42@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_42.imageset/icon_42@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_43.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_43@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_43.imageset/icon_43@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_43.imageset/icon_43@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_44.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_44@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_44.imageset/icon_44@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_44.imageset/icon_44@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_45.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_45@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_45.imageset/icon_45@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_45.imageset/icon_45@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_46.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_46@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_46.imageset/icon_46@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_46.imageset/icon_46@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_47.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_47@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_47.imageset/icon_47@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_47.imageset/icon_47@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_48.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_48@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_48.imageset/icon_48@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_48.imageset/icon_48@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_49.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_49@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_49.imageset/icon_49@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynnekj/JJTableView/51f663de078713bd32f87f91c1675dfeddeb082d/Example/JJTableViewExample/Assets.xcassets/Alipay_icon/icon_49.imageset/icon_49@2x.png -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJBaseCell.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJBaseCell : UIView 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJBaseCell.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseCell.h" 10 | 11 | @implementation JJBaseCell 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseCell.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 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKBaseModel.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJBaseModel : NSObject 12 | 13 | @property (nonatomic,copy) NSString *title; 14 | @property (nonatomic,copy) NSString *icon; 15 | @property (nonatomic,copy) NSString *url; 16 | @property (nonatomic,assign) int status; 17 | 18 | + (instancetype)modelWithDict:(NSDictionary *)dict; 19 | - (instancetype)initWithDict:(NSDictionary *)dict; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJBaseModel.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseModel.h" 10 | 11 | @implementation JJBaseModel 12 | 13 | - (instancetype)initWithDict:(NSDictionary *)dict { 14 | if (self = [super init]) { 15 | [self setValuesForKeysWithDictionary:dict]; 16 | } 17 | return self; 18 | } 19 | 20 | + (instancetype)modelWithDict:(NSDictionary *)dict { 21 | return [[self alloc] initWithDict:dict]; 22 | } 23 | 24 | - (id)mutableCopyWithZone:(nullable NSZone *)zone { 25 | JJBaseModel *baseModel = [[self class] allocWithZone:zone]; 26 | baseModel.title = _title; 27 | baseModel.icon = _icon; 28 | baseModel.url = _url; 29 | baseModel.status = _status; 30 | 31 | return baseModel; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJBaseViewController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JJBaseModel.h" 11 | #import "JJTableView.h" 12 | 13 | @interface JJBaseViewController : UIViewController 14 | 15 | @property (weak, nonatomic) IBOutlet JJTableView *tableView; 16 | @property (nonatomic,strong) NSMutableArray *> *datas; 17 | 18 | @property (nonatomic,copy) NSMutableArray *titles; 19 | 20 | - (NSMutableArray *> *)setDatasWithPlistName:(NSString *)name; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Base/JJBaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJBaseViewController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJBaseViewController () 12 | 13 | @end 14 | 15 | @implementation JJBaseViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | self.automaticallyAdjustsScrollViewInsets = NO; 21 | 22 | self.tableView.dataSource = self; 23 | self.tableView.delegate = self; 24 | } 25 | 26 | - (NSMutableArray *> *)setDatasWithPlistName:(NSString *)name { 27 | 28 | NSString *filePath = [[NSBundle mainBundle] pathForResource:name ofType:@"plist"]; 29 | NSArray *customServiceList = [NSArray arrayWithContentsOfFile:filePath]; 30 | 31 | NSMutableArray *> *arrays = [NSMutableArray array]; 32 | 33 | for (NSMutableArray *dicts in customServiceList) { 34 | NSMutableArray *models = [NSMutableArray arrayWithCapacity:dicts.count]; 35 | 36 | for (NSDictionary *dict in dicts) { 37 | JJBaseModel *baseModel = [JJBaseModel modelWithDict:dict]; 38 | [models addObject:baseModel]; 39 | } 40 | [arrays addObject:models]; 41 | } 42 | self.datas = arrays; 43 | 44 | return self.datas; 45 | } 46 | 47 | - (NSMutableArray *)titles { 48 | if (!_titles) { 49 | _titles = [NSMutableArray arrayWithObjects:@"我的应用", @"便民生活", @"资金往来", @"购物娱乐", @"财富管理", @"教育公益", @"第三方提供服务", nil]; 50 | } 51 | return _titles; 52 | } 53 | 54 | #pragma mark - JJTableViewDelegate 55 | 56 | - (void)tableView:(JJTableView *)tableView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 57 | JJBaseModel *baseModel = [self.datas[indexPath.section] objectAtIndex:indexPath.item]; 58 | self.navigationItem.title = baseModel.title; 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Common/JJClickEffectView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJClickEffectView.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/12. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJClickEffectView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Common/JJClickEffectView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJClickEffectView.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/12. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJClickEffectView.h" 10 | 11 | #define JJDuration 0.35 12 | 13 | @implementation JJClickEffectView 14 | 15 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 16 | [self alphaChanage]; 17 | } 18 | 19 | - (void)alphaChanage { 20 | [UIView animateWithDuration:JJDuration animations:^{ 21 | self.alpha = 0.5; 22 | } completion:^(BOOL finished) { 23 | [UIView animateWithDuration:JJDuration animations:^{ 24 | self.alpha = 1; 25 | }]; 26 | }]; 27 | } 28 | 29 | @end -------------------------------------------------------------------------------- /Example/JJTableViewExample/Common/JJLayoutConstraintHairline.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJLayoutConstraintHairline.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/24. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJLayoutConstraintHairline : NSLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Common/JJLayoutConstraintHairline.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJLayoutConstraintHairline.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/24. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJLayoutConstraintHairline.h" 10 | 11 | #define SINGLE_LINE_WIDTH (1 / [UIScreen mainScreen].scale) 12 | #define SINGLE_LINE_ADJUST_OFFSET ((1 / [UIScreen mainScreen].scale) / 2) 13 | 14 | @implementation JJLayoutConstraintHairline 15 | 16 | - (void) awakeFromNib{ 17 | [super awakeFromNib]; 18 | if(self.constant == 1)self.constant = (1 / [UIScreen mainScreen].scale); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineCell.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger,JJHeadlineCellStatus) { 12 | JJHeadlineCellStatusEditable, 13 | JJHeadlineCellStatusCannotEdit, 14 | JJHeadlineCellStatusSelected 15 | }; 16 | 17 | 18 | @interface JJHeadlineCell : UICollectionViewCell 19 | 20 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 21 | 22 | @property (nonatomic,assign) JJHeadlineCellStatus status; 23 | 24 | - (void)setEdit:(BOOL)isEditing animated:(BOOL)animated; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineCell.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJHeadlineCell.h" 10 | 11 | #define JJDuration 0.3 12 | 13 | @interface JJHeadlineCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UIButton *closeButton; 16 | @property (weak, nonatomic) IBOutlet UIView *borderlineView; 17 | @property (nonatomic,assign,getter=isEditing) BOOL editing; 18 | 19 | @end 20 | 21 | @implementation JJHeadlineCell 22 | 23 | - (void)awakeFromNib { 24 | [super awakeFromNib]; 25 | // Initialization code 26 | self.borderlineView.layer.borderColor = [UIColor colorWithRed:0.836 green:0.844 blue:0.844 alpha:1.000].CGColor; 27 | self.borderlineView.layer.borderWidth = 1 / [UIScreen mainScreen].scale; 28 | 29 | self.closeButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 30 | self.editing = NO; 31 | } 32 | 33 | - (void)setEdit:(BOOL)isEditing animated:(BOOL)animated { 34 | if (isEditing == self.isEditing) return; 35 | self.editing = isEditing; 36 | 37 | [self setOperationButtonVisible:isEditing animated:animated]; 38 | } 39 | 40 | - (void)setOperationButtonVisible:(BOOL)visible animated:(BOOL)animated { 41 | if (animated) { 42 | if (visible) { 43 | self.closeButton.hidden = !visible; 44 | self.closeButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 45 | } 46 | 47 | [UIView animateWithDuration:JJDuration animations:^{ 48 | if (visible) { 49 | self.closeButton.transform = CGAffineTransformIdentity; 50 | } else { 51 | self.closeButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 52 | } 53 | 54 | } completion:^(BOOL finished) { 55 | if (!visible) { 56 | self.closeButton.hidden = !visible; 57 | } 58 | }]; 59 | 60 | } else { 61 | self.closeButton.transform = CGAffineTransformIdentity; 62 | self.closeButton.hidden = !visible; 63 | } 64 | } 65 | 66 | - (void)setStatus:(JJHeadlineCellStatus)status { 67 | if (_status == status) return; 68 | 69 | _status = status; 70 | switch (status) { 71 | case JJHeadlineCellStatusEditable: 72 | self.titleLabel.textColor = [UIColor blackColor]; 73 | break; 74 | 75 | case JJHeadlineCellStatusCannotEdit: 76 | self.titleLabel.textColor = [UIColor lightGrayColor]; 77 | break; 78 | 79 | case JJHeadlineCellStatusSelected: 80 | self.titleLabel.textColor = [UIColor redColor]; 81 | break; 82 | } 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineCell.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 | 31 | 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 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineHeader.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JJHeadlineHeader; 12 | 13 | @protocol JJHeadlineHeaderProtocol 14 | 15 | - (void)header:(JJHeadlineHeader *)header operationButtonStatusDidChanged:(BOOL)editing; 16 | 17 | @end 18 | 19 | 20 | @interface JJHeadlineHeader : UIView 21 | 22 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 23 | @property (weak, nonatomic) IBOutlet UILabel *detailLabel; 24 | @property (weak, nonatomic) IBOutlet UIButton *editButton; 25 | 26 | @property (nonatomic,weak) id delegate; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineHeader.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJHeadlineHeader.h" 10 | 11 | @interface JJHeadlineHeader () 12 | 13 | @property (nonatomic,assign,getter=isEditing) BOOL editing; 14 | 15 | @end 16 | 17 | 18 | @implementation JJHeadlineHeader 19 | 20 | - (void)awakeFromNib { 21 | [super awakeFromNib]; 22 | self.editButton.layer.borderWidth = 1 / [UIScreen mainScreen].scale; 23 | self.editButton.layer.borderColor = [UIColor colorWithRed:0.984 green:0.376 blue:0.337 alpha:1.000].CGColor; 24 | self.editButton.layer.cornerRadius = self.editButton.frame.size.height / 2; 25 | } 26 | 27 | - (IBAction)editButtonDidClick:(UIButton *)sender { 28 | self.editing = !self.isEditing; 29 | [self.editButton setTitle:self.isEditing ? @"完成" : @"编辑" forState:UIControlStateNormal]; 30 | self.detailLabel.hidden = !self.editing; 31 | 32 | if ([self.delegate respondsToSelector:@selector(header:operationButtonStatusDidChanged:)]) { 33 | [self.delegate header:self operationButtonStatusDidChanged:self.isEditing]; 34 | } 35 | } 36 | 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineHeader.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineMenuController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJHeadlineMenuController : JJBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/JJHeadlineMenuController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJHeadlineMenuController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/9. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJHeadlineMenuController.h" 10 | #import "JJHeadlineCell.h" 11 | #import "JJHeadlineHeader.h" 12 | 13 | static NSString *JJHeadlineCellIdentifier = @"JJHeadlineCell"; 14 | static NSString *JJHeadlineHeaderIdentifier = @"JJHeadlineHeader"; 15 | 16 | @interface JJHeadlineMenuController () 17 | 18 | @end 19 | 20 | @implementation JJHeadlineMenuController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view. 25 | self.automaticallyAdjustsScrollViewInsets = NO; 26 | [super setDatasWithPlistName:@"headline_menu"]; 27 | 28 | UIButton *closeButton = [[UIButton alloc] init]; 29 | [closeButton setTitle:@"✕" forState:UIControlStateNormal]; 30 | [closeButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal]; 31 | closeButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; 32 | closeButton.titleLabel.font = [UIFont systemFontOfSize:24]; 33 | closeButton.frame = CGRectMake(0, 0, 100, 30); 34 | [closeButton addTarget:self action:@selector(closeButtonDidClick:) forControlEvents:UIControlEventTouchUpInside]; 35 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:closeButton]; 36 | 37 | UINib *headlineCellNib = [UINib nibWithNibName:JJHeadlineCellIdentifier bundle:nil]; 38 | [self.tableView registerNib:headlineCellNib forCellReuseIdentifier:JJHeadlineCellIdentifier]; 39 | 40 | UINib *headerNib = [UINib nibWithNibName:JJHeadlineHeaderIdentifier bundle:nil]; 41 | [self.tableView registerNib:headerNib forHeaderViewReuseIdentifier:JJHeadlineHeaderIdentifier]; 42 | 43 | self.tableView.cellCloseButtonLocation = JJTableViewCellCloseButtonLocationTopRight; 44 | } 45 | 46 | - (void)closeButtonDidClick:(UIButton *)button { 47 | [self.navigationController popViewControllerAnimated:YES]; 48 | } 49 | 50 | #pragma mark - JJTableViewDataSource 51 | 52 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 53 | return self.datas.count; 54 | } 55 | 56 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 57 | return self.datas[section].count; 58 | } 59 | 60 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 61 | JJHeadlineCell *cell = [tableView dequeueReusableCellWithIdentifier:JJHeadlineCellIdentifier]; 62 | 63 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 64 | cell.titleLabel.text = model.title; 65 | 66 | [cell setEdit:(self.tableView.editing && (indexPath.section == 0 && indexPath.item != 0)) animated:NO]; 67 | 68 | if ([self.navigationItem.title isEqualToString:model.title]) { 69 | cell.status = JJHeadlineCellStatusSelected; 70 | 71 | } else if (indexPath.section == 0 && indexPath.item == 0) { 72 | cell.status = JJHeadlineCellStatusCannotEdit; 73 | 74 | } else { 75 | cell.status = JJHeadlineCellStatusEditable; 76 | } 77 | 78 | 79 | return cell; 80 | } 81 | 82 | #pragma mark - JJTableViewDelegate 83 | 84 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 85 | return 4; 86 | } 87 | 88 | - (CGFloat)heightForCellInTableView:(JJTableView *)tableView { 89 | return 40; 90 | } 91 | 92 | - (nullable UIView *)tableView:(JJTableView *)tableView viewForHeaderInSection:(NSInteger)section { 93 | JJHeadlineHeader *headerView = [tableView dequeueReusableHeaderViewWithIdentifier:JJHeadlineHeaderIdentifier]; 94 | 95 | if (section == 0) { 96 | headerView.titleLabel.text = @"我的频道"; 97 | headerView.editButton.hidden = NO; 98 | headerView.delegate = self; 99 | } else { 100 | headerView.titleLabel.text = @"频道推荐"; 101 | headerView.editButton.hidden = YES; 102 | headerView.detailLabel.hidden = YES; 103 | } 104 | 105 | return headerView; 106 | } 107 | 108 | - (CGFloat)tableView:(JJTableView *)tableView heightForHeaderInSection:(NSInteger)section { 109 | return 34; 110 | } 111 | 112 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 113 | switch (type) { 114 | case JJTableViewMarginTypeTop: 115 | return 18; 116 | case JJTableViewMarginTypeLeft: 117 | return 20; 118 | case JJTableViewMarginTypeRight: 119 | return 20; 120 | case JJTableViewMarginTypeBottom: 121 | return 0; 122 | case JJTableViewMarginTypeColumn: 123 | return 6; 124 | case JJTableViewMarginTypeRow: 125 | return 6; 126 | case JJTableViewMarginTypeHeaderLeading: 127 | return 0; 128 | case JJTableViewMarginTypeHeaderTrailing: 129 | return 0; 130 | case JJTableViewMarginTypeSectionLeading: 131 | return 18; 132 | case JJTableViewMarginTypeSectionTrailing: 133 | return 16; 134 | } 135 | } 136 | 137 | - (BOOL)tableView:(JJTableView *)tableView canMoveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 138 | if (destinationIndexPath.section == 0 && destinationIndexPath.item == 0) { 139 | return NO; 140 | } 141 | return YES; 142 | } 143 | 144 | - (BOOL)tableView:(JJTableView *)tableView canLongPressAndMoveItemAtIndexPath:(NSIndexPath *)indexPath { 145 | if (indexPath.section == 1 || (indexPath.section == 0 && indexPath.item == 0)) { 146 | return NO; 147 | } 148 | return YES; 149 | } 150 | 151 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath { 152 | [self moveItemAtIndexPath:sourceIndexPath toIndexPath:destinationIndexPath]; 153 | 154 | if (sourceIndexPath.section == 0 && destinationIndexPath.section == 1) { 155 | JJHeadlineCell *selectedCell = [self.tableView cellForItemAtIndexPath:destinationIndexPath]; 156 | [selectedCell setEdit:NO animated:YES]; 157 | } 158 | } 159 | 160 | - (void)tableView:(JJTableView *)tableView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 161 | JJHeadlineCell *selectedCell = [self.tableView cellForItemAtIndexPath:indexPath]; 162 | 163 | if (indexPath.section == 1) { 164 | if (self.tableView.isEditing) { 165 | [selectedCell setEdit:YES animated:YES]; 166 | } 167 | 168 | NSIndexPath *destinationIndexPath = [NSIndexPath indexPathForItem:self.datas.firstObject.count inSection:0]; 169 | [self moveItemAtIndexPath:indexPath toIndexPath:destinationIndexPath]; 170 | 171 | NSIndexPath *toIndexPath = [NSIndexPath indexPathForItem:self.datas.firstObject.count - 1 inSection:0]; 172 | [self.tableView moveItemAtIndexPath:indexPath toIndexPath:toIndexPath]; 173 | 174 | } else if (self.tableView.isEditing) { 175 | if (indexPath.section == 0 && indexPath.item == 0) { 176 | return; 177 | } 178 | 179 | [selectedCell setEdit:NO animated:YES]; 180 | 181 | NSIndexPath *destinationIndexPath = [NSIndexPath indexPathForItem:0 inSection:self.datas.count - 1]; 182 | [self moveItemAtIndexPath:indexPath toIndexPath:destinationIndexPath]; 183 | 184 | [self.tableView moveItemAtIndexPath:indexPath toIndexPath:destinationIndexPath]; 185 | 186 | } else { 187 | JJBaseModel *baseModel = self.datas[indexPath.section][indexPath.item]; 188 | self.navigationItem.title = baseModel.title; 189 | } 190 | } 191 | 192 | #pragma mark - JJHeadlineHeaderProtocol 193 | 194 | - (void)header:(JJHeadlineHeader *)header operationButtonStatusDidChanged:(BOOL)editing { 195 | self.tableView.editing = editing; 196 | 197 | for (JJHeadlineCell *cell in self.tableView.visibleCells) { 198 | NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; 199 | 200 | if (indexPath.section == 0 && indexPath.item != 0) { 201 | [cell setEdit:editing animated:YES]; 202 | } 203 | } 204 | 205 | } 206 | 207 | - (void)moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath { 208 | JJBaseModel *baseModel = [self.datas[sourceIndexPath.section] objectAtIndex:sourceIndexPath.item]; 209 | [self.datas[sourceIndexPath.section] removeObjectAtIndex:sourceIndexPath.item]; 210 | [self.datas[destinationIndexPath.section] insertObject:baseModel atIndex:destinationIndexPath.item]; 211 | } 212 | 213 | @end 214 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/Headline/headline_menu.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | url 8 | 9 | title 10 | 推荐 11 | 12 | 13 | url 14 | 15 | title 16 | 深圳 17 | 18 | 19 | url 20 | 21 | title 22 | 科技 23 | 24 | 25 | url 26 | 27 | title 28 | 科学 29 | 30 | 31 | url 32 | 33 | title 34 | 股票 35 | 36 | 37 | url 38 | 39 | title 40 | 房产 41 | 42 | 43 | url 44 | 45 | title 46 | 手机 47 | 48 | 49 | url 50 | 51 | title 52 | 数码 53 | 54 | 55 | url 56 | 57 | title 58 | 健康 59 | 60 | 61 | url 62 | 63 | title 64 | 国际 65 | 66 | 67 | url 68 | 69 | title 70 | 游戏 71 | 72 | 73 | 74 | 75 | url 76 | 77 | title 78 | 历史 79 | 80 | 81 | url 82 | 83 | title 84 | 政务 85 | 86 | 87 | url 88 | 89 | title 90 | 探索 91 | 92 | 93 | url 94 | 95 | title 96 | 情感 97 | 98 | 99 | url 100 | 101 | title 102 | 美图 103 | 104 | 105 | url 106 | 107 | title 108 | 家居 109 | 110 | 111 | url 112 | 113 | title 114 | 搞笑 115 | 116 | 117 | url 118 | 119 | title 120 | 星座 121 | 122 | 123 | url 124 | 125 | title 126 | 文化 127 | 128 | 129 | url 130 | 131 | title 132 | 教育 133 | 134 | 135 | url 136 | 137 | title 138 | 正能量 139 | 140 | 141 | url 142 | 143 | title 144 | 特卖 145 | 146 | 147 | url 148 | 149 | title 150 | 奇葩 151 | 152 | 153 | url 154 | 155 | title 156 | 旅游 157 | 158 | 159 | url 160 | 161 | title 162 | 三农 163 | 164 | 165 | url 166 | 167 | title 168 | 收藏 169 | 170 | 171 | url 172 | 173 | title 174 | 语录 175 | 176 | 177 | url 178 | 179 | title 180 | 宠物 181 | 182 | 183 | url 184 | 185 | title 186 | 孕产 187 | 188 | 189 | url 190 | 191 | title 192 | 动漫 193 | 194 | 195 | url 196 | 197 | title 198 | 电影 199 | 200 | 201 | url 202 | 203 | title 204 | 精选 205 | 206 | 207 | url 208 | 209 | title 210 | 时尚 211 | 212 | 213 | url 214 | 215 | title 216 | 育儿 217 | 218 | 219 | url 220 | 221 | title 222 | 趣图 223 | 224 | 225 | url 226 | 227 | title 228 | 段子 229 | 230 | 231 | url 232 | 233 | title 234 | 养生 235 | 236 | 237 | url 238 | 239 | title 240 | 视频 241 | 242 | 243 | url 244 | 245 | title 246 | 军事 247 | 248 | 249 | url 250 | 251 | title 252 | 美女 253 | 254 | 255 | url 256 | 257 | title 258 | 娱乐 259 | 260 | 261 | url 262 | 263 | title 264 | 社会 265 | 266 | 267 | url 268 | 269 | title 270 | 财经 271 | 272 | 273 | url 274 | 275 | title 276 | 体育 277 | 278 | 279 | url 280 | 281 | title 282 | 图片 283 | 284 | 285 | url 286 | 287 | title 288 | 汽车 289 | 290 | 291 | url 292 | 293 | title 294 | 故事 295 | 296 | 297 | url 298 | 299 | title 300 | 辟谣 301 | 302 | 303 | url 304 | 305 | title 306 | 头条号 307 | 308 | 309 | url 310 | 311 | title 312 | 热点 313 | 314 | 315 | url 316 | 317 | title 318 | 美文 319 | 320 | 321 | url 322 | 323 | title 324 | 美食 325 | 326 | 327 | url 328 | 329 | title 330 | 问答 331 | 332 | 333 | url 334 | 335 | title 336 | 火山直播 337 | 338 | 339 | 340 | 341 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipayCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipayCell.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger,JJNewAlipayCellStatus) { 12 | JJNewAlipayCellStatusDelable = 1, 13 | JJNewAlipayCellStatusAddable, 14 | JJNewAlipayCellStatusOK 15 | }; 16 | 17 | @class JJNewAlipayCell; 18 | 19 | 20 | @protocol JJNewAlipayCellProtocol 21 | 22 | - (void)cellOperationButtonDidClick:(JJNewAlipayCell *)cell; 23 | 24 | @end 25 | 26 | 27 | @interface JJNewAlipayCell : UIView 28 | 29 | @property (weak, nonatomic) IBOutlet UIButton *operationButton; 30 | @property (weak, nonatomic) IBOutlet UIImageView *iconView; 31 | @property (weak, nonatomic) IBOutlet UILabel *title; 32 | @property (nonatomic,assign) JJNewAlipayCellStatus status; 33 | 34 | @property (nonatomic,weak) id delegate; 35 | 36 | - (void)setEdit:(BOOL)isEditing animated:(BOOL)animated; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipayCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipayCell.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJNewAlipayCell.h" 10 | 11 | #define JJDuration 0.3 12 | 13 | @interface JJNewAlipayCell () 14 | 15 | @property (nonatomic,strong) CALayer *borderLayer; 16 | @property (nonatomic,assign,getter=isEditing) BOOL editing; 17 | 18 | @end 19 | 20 | @implementation JJNewAlipayCell 21 | 22 | - (IBAction)operationButtonDidclick:(UIButton *)sender { 23 | if (self.status != JJNewAlipayCellStatusOK && [self.delegate respondsToSelector:@selector(cellOperationButtonDidClick:)]) { 24 | [self.delegate cellOperationButtonDidClick:self]; 25 | } 26 | } 27 | 28 | - (void)awakeFromNib { 29 | [super awakeFromNib]; 30 | // Initialization code 31 | self.operationButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 32 | self.editing = NO; 33 | } 34 | 35 | - (void)setEditing:(BOOL)editing { 36 | _editing = editing; 37 | } 38 | 39 | - (CALayer *)borderLayer { 40 | if (!_borderLayer) { 41 | CALayer *lineLayer = [CALayer layer]; 42 | lineLayer.borderWidth = 1 / [UIScreen mainScreen].scale; 43 | lineLayer.borderColor = [UIColor lightGrayColor].CGColor; 44 | lineLayer.frame = self.layer.bounds; 45 | lineLayer.opacity = 0; 46 | [self.layer addSublayer:lineLayer]; 47 | 48 | _borderLayer = lineLayer; 49 | } 50 | return _borderLayer; 51 | } 52 | 53 | - (void)layoutSubviews { 54 | [super layoutSubviews]; 55 | self.borderLayer.frame = self.layer.bounds; 56 | } 57 | 58 | - (void)setStatus:(JJNewAlipayCellStatus)status { 59 | if (_status == status) return; 60 | 61 | _status = status; 62 | switch (status) { 63 | case JJNewAlipayCellStatusAddable: 64 | [self.operationButton setImage:[UIImage imageNamed:@"app_add"] forState:UIControlStateNormal]; 65 | break; 66 | 67 | case JJNewAlipayCellStatusDelable: 68 | [self.operationButton setImage:[UIImage imageNamed:@"app_del"] forState:UIControlStateNormal]; 69 | break; 70 | 71 | case JJNewAlipayCellStatusOK: 72 | [self.operationButton setImage:[UIImage imageNamed:@"app_ok"] forState:UIControlStateNormal]; 73 | break; 74 | } 75 | } 76 | 77 | - (void)setEdit:(BOOL)isEditing animated:(BOOL)animated { 78 | if (isEditing == self.isEditing) return; 79 | self.editing = isEditing; 80 | 81 | [self setborderLayerVisible:isEditing animated:animated]; 82 | [self setOperationButtonVisible:isEditing animated:animated]; 83 | } 84 | 85 | - (void)setborderLayerVisible:(BOOL)visible animated:(BOOL)animated { 86 | [self.borderLayer removeAnimationForKey:@"opacityAnim"]; 87 | 88 | if (animated) { 89 | self.borderLayer.opacity = 0; 90 | CABasicAnimation* bAnim = [CABasicAnimation animationWithKeyPath:@"opacity"]; 91 | bAnim.removedOnCompletion = NO; 92 | bAnim.fillMode = kCAFillModeForwards; 93 | bAnim.duration = JJDuration; 94 | bAnim.delegate = self; 95 | 96 | if (visible) { 97 | bAnim.toValue = @(1); 98 | } else { 99 | bAnim.fromValue = @(1); 100 | } 101 | [self.borderLayer addAnimation:bAnim forKey:@"opacityAnim"]; 102 | 103 | } else { 104 | if (visible) { 105 | self.borderLayer.opacity = 1; 106 | } else { 107 | self.borderLayer.opacity = 0; 108 | } 109 | } 110 | } 111 | 112 | - (void)setOperationButtonVisible:(BOOL)visible animated:(BOOL)animated { 113 | if (animated) { 114 | if (visible) { 115 | self.operationButton.hidden = !visible; 116 | self.operationButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 117 | } 118 | 119 | [UIView animateWithDuration:JJDuration animations:^{ 120 | if (visible) { 121 | self.operationButton.transform = CGAffineTransformIdentity; 122 | } else { 123 | self.operationButton.transform = CGAffineTransformMakeScale(0.01, 0.01); 124 | } 125 | 126 | } completion:^(BOOL finished) { 127 | if (!visible) { 128 | self.operationButton.hidden = !visible; 129 | } 130 | }]; 131 | 132 | } else { 133 | self.operationButton.transform = CGAffineTransformIdentity; 134 | self.operationButton.hidden = !visible; 135 | } 136 | } 137 | 138 | #pragma mark - CAAnimationDelegate 139 | 140 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { 141 | self.borderLayer.opacity = self.isEditing ? 1 : 0; 142 | } 143 | 144 | @end 145 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipayCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 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 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipayController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipayController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/1. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJNewAlipayController : JJBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipayController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipayController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/1. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJNewAlipayController.h" 10 | #import "JJNewAlipayCell.h" 11 | 12 | static NSString *JJNewAlipayCellIdentifier = @"JJNewAlipayCell"; 13 | static NSString *JJNewAlipaySeparatorHeaderIdentifier = @"JJNewAlipaySeparatorHeader"; 14 | 15 | @interface JJNewAlipayController () 16 | 17 | @property (nonatomic,assign,getter=isEditing) BOOL editing; 18 | @property (nonatomic,strong) UIButton *editButton; 19 | 20 | @end 21 | 22 | @implementation JJNewAlipayController 23 | 24 | - (JJNewAlipayCellStatus)statusForItemAtIndexPath:(NSIndexPath *)indexPath { 25 | if (indexPath.section == 0) { 26 | return JJNewAlipayCellStatusDelable; 27 | } 28 | 29 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 30 | for (JJBaseModel *selectedItem in self.datas.firstObject) { 31 | if ([selectedItem.title isEqualToString:model.title]) { 32 | return JJNewAlipayCellStatusOK; 33 | } 34 | } 35 | 36 | return JJNewAlipayCellStatusAddable; 37 | } 38 | 39 | - (NSIndexPath *)indexPathWithDeleteModel:(JJBaseModel *)baseModel { 40 | if (self.datas.count <= 0) return nil; 41 | 42 | for (int sectionCount = 1; sectionCount < self.datas.count; sectionCount++) { 43 | for (int itemCount = 0; itemCount < self.datas[sectionCount].count; itemCount++) { 44 | JJBaseModel *model = self.datas[sectionCount][itemCount]; 45 | if ([baseModel.title isEqualToString:model.title]) { 46 | return [NSIndexPath indexPathForItem:itemCount inSection:sectionCount]; 47 | } 48 | } 49 | } 50 | return nil; 51 | } 52 | 53 | - (UIButton *)editButton { 54 | if (!_editButton) { 55 | UIButton *editButton = [[UIButton alloc] init]; 56 | [editButton setTitle:@"管理" forState:UIControlStateNormal]; 57 | [editButton setTitleColor:[UIColor colorWithRed:0.000 green:0.384 blue:1.000 alpha:1.000] forState:UIControlStateNormal]; 58 | editButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; 59 | editButton.titleLabel.font = [UIFont systemFontOfSize:16]; 60 | editButton.frame = CGRectMake(0, 0, 100, 30); 61 | [editButton addTarget:self action:@selector(editButtonDidClick:) forControlEvents:UIControlEventTouchUpInside]; 62 | 63 | _editButton = editButton; 64 | } 65 | return _editButton; 66 | } 67 | 68 | - (void)viewDidLoad { 69 | [super viewDidLoad]; 70 | // Do any additional setup after loading the view. 71 | self.automaticallyAdjustsScrollViewInsets = NO; 72 | [super setDatasWithPlistName:@"new_alipay_menu"]; 73 | 74 | UINib *newAlipayCell = [UINib nibWithNibName:JJNewAlipayCellIdentifier bundle:nil]; 75 | [self.tableView registerNib:newAlipayCell forCellReuseIdentifier:JJNewAlipayCellIdentifier]; 76 | 77 | UINib *oldAlipayHeaderNib = [UINib nibWithNibName:JJNewAlipaySeparatorHeaderIdentifier bundle:nil]; 78 | [self.tableView registerNib:oldAlipayHeaderNib forHeaderViewReuseIdentifier:JJNewAlipaySeparatorHeaderIdentifier]; 79 | 80 | self.tableView.separatorStyle = JJTableViewSeparatorStyleHeaderLeadingSingleLine; 81 | 82 | self.tableView.headerBackgroundColor = [UIColor whiteColor]; 83 | 84 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.editButton]; 85 | } 86 | 87 | - (void)setEditing:(BOOL)editing { 88 | _editing = editing; 89 | self.tableView.editing = editing; 90 | } 91 | 92 | - (void)editButtonDidClick:(UIButton *)editButton { 93 | [self.editButton setTitle:self.isEditing ? @"管理" : @"完成" forState:UIControlStateNormal]; 94 | self.editing = !self.isEditing; 95 | 96 | for (JJNewAlipayCell *cell in self.tableView.visibleCells) { 97 | [cell setEdit:self.editing animated:YES]; 98 | } 99 | } 100 | 101 | #pragma mark - JJTableViewDataSource 102 | 103 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 104 | return self.datas.count; 105 | } 106 | 107 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 108 | return self.datas[section].count; 109 | } 110 | 111 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 112 | JJNewAlipayCell *cell = [tableView dequeueReusableCellWithIdentifier:JJNewAlipayCellIdentifier]; 113 | 114 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 115 | cell.title.text = model.title; 116 | cell.iconView.image = [UIImage imageNamed:model.icon]; 117 | cell.status = model.status; 118 | 119 | [cell setEdit:self.editing animated:NO]; 120 | 121 | if (!cell.delegate) { 122 | cell.delegate = self; 123 | } 124 | 125 | return cell; 126 | } 127 | 128 | #pragma mark JJTableViewDelegate 129 | 130 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 131 | return 4; 132 | } 133 | 134 | - (CGFloat)tableView:(JJTableView *)tableView heightForHeaderInSection:(NSInteger)section { 135 | if (section == 1) { 136 | return 48; 137 | } 138 | return 36; 139 | } 140 | 141 | - (UIView *)tableView:(JJTableView *)tableView viewForHeaderInSection:(NSInteger)section { 142 | if (section == 1) { 143 | UIView *headerView = [tableView dequeueReusableHeaderViewWithIdentifier:JJNewAlipaySeparatorHeaderIdentifier]; 144 | return headerView; 145 | } 146 | return nil; 147 | } 148 | - (CGFloat)heightForCellInTableView:(JJTableView *)tableView { 149 | return 84; 150 | } 151 | 152 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 153 | switch (type) { 154 | case JJTableViewMarginTypeTop: 155 | return 0; 156 | case JJTableViewMarginTypeLeft: 157 | return 8; 158 | case JJTableViewMarginTypeRight: 159 | return 8; 160 | case JJTableViewMarginTypeBottom: 161 | return 0; 162 | case JJTableViewMarginTypeColumn: 163 | return 10; 164 | case JJTableViewMarginTypeRow: 165 | return 6; 166 | case JJTableViewMarginTypeHeaderLeading: 167 | return 0; 168 | case JJTableViewMarginTypeHeaderTrailing: 169 | return 0; 170 | case JJTableViewMarginTypeSectionLeading: 171 | return 0; 172 | case JJTableViewMarginTypeSectionTrailing: 173 | return 18; 174 | } 175 | } 176 | 177 | - (nullable NSString *)tableView:(JJTableView *)tableView titleForHeaderInSection:(NSInteger)section { 178 | return self.titles[section]; 179 | } 180 | 181 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 182 | JJBaseModel *baseModel = [self.datas[sourceIndexPath.section] objectAtIndex:sourceIndexPath.item]; 183 | [self.datas[sourceIndexPath.section] removeObjectAtIndex:sourceIndexPath.item]; 184 | [self.datas[destinationIndexPath.section] insertObject:baseModel atIndex:destinationIndexPath.item]; 185 | } 186 | 187 | - (BOOL)tableView:(JJTableView *)tableView canLongPressAndMoveItemAtIndexPath:(NSIndexPath *)indexPath { 188 | if (!self.editing) { 189 | [self editButtonDidClick:nil]; 190 | } 191 | 192 | if (indexPath.section == 0) { 193 | return YES; 194 | } 195 | return NO; 196 | } 197 | 198 | - (BOOL)tableView:(JJTableView *)tableView canMoveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 199 | NSLog(@"sourceIndexPath = %@",sourceIndexPath); 200 | NSLog(@"destinationIndexPath = %@",destinationIndexPath); 201 | 202 | if (destinationIndexPath.section > 0) { 203 | return NO; 204 | } 205 | return YES; 206 | } 207 | 208 | #pragma mark - JJNewAlipayCellProtocol 209 | 210 | - (void)cellOperationButtonDidClick:(JJNewAlipayCell *)cell { 211 | NSIndexPath *cellIndexPath = [self.tableView indexPathForCell:cell]; 212 | JJBaseModel *selectedModel = self.datas[cellIndexPath.section][cellIndexPath.item]; 213 | 214 | if (cellIndexPath.section == 0) { 215 | [self.datas.firstObject removeObjectAtIndex:cellIndexPath.item]; 216 | [self.tableView deleteItemAtIndexPath:cellIndexPath withItemAnimation:JJTableViewItemAnimationShrink]; 217 | 218 | NSIndexPath *sourceIndexPath = [self indexPathWithDeleteModel:selectedModel]; 219 | JJBaseModel *sourceModel = self.datas[sourceIndexPath.section][sourceIndexPath.item]; 220 | sourceModel.status = JJNewAlipayCellStatusAddable; 221 | [self.tableView reloadItemAtIndexPath:sourceIndexPath withItemAnimation:JJTableViewItemAnimationFade]; 222 | 223 | } else { 224 | // 无移动效果 225 | // JJBaseModel *newModel = [selectedModel mutableCopy]; 226 | // newModel.status = JJNewAlipayCellStatusDelable; 227 | // 228 | // [self.datas.firstObject addObject:newModel]; 229 | // NSIndexPath *insertIP = [NSIndexPath indexPathForItem:self.datas.firstObject.count - 1 inSection:0]; 230 | // [self.tableView insertItemAtIndexPath:insertIP withItemAnimation:JJTableViewItemAnimationShrink]; 231 | // 232 | // selectedModel.status = JJNewAlipayCellStatusOK; 233 | // [self.tableView reloadItemAtIndexPath:cellIndexPath withItemAnimation:JJTableViewItemAnimationNone]; 234 | 235 | 236 | // 有移动效果 237 | JJBaseModel *newModel = [selectedModel mutableCopy]; 238 | newModel.status = JJNewAlipayCellStatusDelable; 239 | 240 | [self.datas[cellIndexPath.section] insertObject:newModel atIndex:cellIndexPath.item]; 241 | [self.tableView insertItemAtIndexPath:cellIndexPath withItemAnimation:JJTableViewItemAnimationNone]; 242 | 243 | JJBaseModel *moveModel = self.datas[cellIndexPath.section][cellIndexPath.item]; 244 | [self.datas.firstObject addObject:moveModel]; 245 | [self.datas[cellIndexPath.section] removeObjectAtIndex:cellIndexPath.item]; 246 | 247 | NSIndexPath *insertIP = [NSIndexPath indexPathForItem:self.datas.firstObject.count - 1 inSection:0]; 248 | [self.tableView moveItemAtIndexPath:cellIndexPath toIndexPath:insertIP]; 249 | 250 | // 未知问题,必须延时一下不然,会导致内部无法获取当前移动动画 view 的frame 251 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 252 | [self.tableView reloadItemAtIndexPath:insertIP withItemAnimation:JJTableViewItemAnimationShrink]; 253 | }); 254 | 255 | JJBaseModel *reloadModel = self.datas[cellIndexPath.section][cellIndexPath.item]; 256 | reloadModel.status = JJNewAlipayCellStatusOK; 257 | [self.tableView reloadItemAtIndexPath:cellIndexPath withItemAnimation:JJTableViewItemAnimationFade]; 258 | } 259 | 260 | } 261 | 262 | @end 263 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipaySeparatorHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipaySeparatorHeader.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/2. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJNewAlipaySeparatorHeader : UIView 12 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipaySeparatorHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJNewAlipaySeparatorHeader.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/2. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJNewAlipaySeparatorHeader.h" 10 | 11 | @implementation JJNewAlipaySeparatorHeader 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/NewAlipay/JJNewAlipaySeparatorHeader.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayBannerHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJBannerHeaderView.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/22. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJOldAlipayBannerHeader : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayBannerHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJBannerHeaderView.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/22. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJOldAlipayBannerHeader.h" 10 | 11 | @implementation JJOldAlipayBannerHeader 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayBannerHeader.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 | 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 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJOldAlipayCell.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JJOldAlipayCell : UITableViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *iconView; 14 | @property (weak, nonatomic) IBOutlet UILabel *title; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJOldAlipayCell.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJOldAlipayCell.h" 10 | 11 | @implementation JJOldAlipayCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | 18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 19 | [super setSelected:selected animated:animated]; 20 | 21 | // Configure the view for the selected state 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JJOldAlipayController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJViewController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJOldAlipayController.h" 10 | #import "JJTableView.h" 11 | #import "JJOldAlipayCell.h" 12 | #import "JJOldAlipayController.h" 13 | 14 | @interface JJOldAlipayController () 15 | 16 | @end 17 | 18 | static NSString *JJOldAlipayCellIdentifier = @"JJOldAlipayCell"; 19 | static NSString *JJOldAlipayBannerHeaderIdentifier = @"JJOldAlipayBannerHeader"; 20 | 21 | @implementation JJOldAlipayController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | self.automaticallyAdjustsScrollViewInsets = false; 26 | [super setDatasWithPlistName:@"old_alipay_menu"]; 27 | 28 | // 注册 cell 29 | UINib *oldAlipayCellNib = [UINib nibWithNibName:JJOldAlipayCellIdentifier bundle:nil]; 30 | [self.tableView registerNib:oldAlipayCellNib forCellReuseIdentifier:JJOldAlipayCellIdentifier]; 31 | 32 | // 注册 header view 33 | UINib *oldAlipayHeaderNib = [UINib nibWithNibName:JJOldAlipayBannerHeaderIdentifier bundle:nil]; 34 | [self.tableView registerNib:oldAlipayHeaderNib forHeaderViewReuseIdentifier:JJOldAlipayBannerHeaderIdentifier]; 35 | 36 | self.tableView.separatorStyle = JJTableViewSeparatorStyleCellOutlineBorderTopBottomLine | JJTableViewSeparatorStyleRowColumnSingleLine; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | #pragma mark - JJTableViewDataSource 45 | 46 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 47 | return self.datas.count; 48 | } 49 | 50 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 51 | return self.datas[section].count; 52 | } 53 | 54 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 55 | JJOldAlipayCell *cell = [tableView dequeueReusableCellWithIdentifier:JJOldAlipayCellIdentifier]; 56 | 57 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 58 | cell.title.text = model.title; 59 | cell.iconView.image = [UIImage imageNamed:model.icon]; 60 | 61 | return cell; 62 | } 63 | 64 | #pragma mark - JJTableViewDelegate 65 | 66 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 67 | return 4; 68 | } 69 | 70 | - (NSUInteger)numberOfRowsInTableView:(JJTableView *)tableView { 71 | return 2; 72 | } 73 | 74 | - (CGFloat)heightForCellInTableView:(JJTableView *)tableView { 75 | return 100; 76 | } 77 | 78 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 79 | switch (type) { 80 | case JJTableViewMarginTypeTop: 81 | return 0; 82 | case JJTableViewMarginTypeLeft: 83 | return 0; 84 | case JJTableViewMarginTypeRight: 85 | return 0; 86 | case JJTableViewMarginTypeBottom: 87 | return 0; 88 | case JJTableViewMarginTypeColumn: 89 | return 0; 90 | case JJTableViewMarginTypeRow: 91 | return 0; 92 | case JJTableViewMarginTypeHeaderLeading: 93 | return 0; 94 | case JJTableViewMarginTypeHeaderTrailing: 95 | return 0; 96 | case JJTableViewMarginTypeSectionLeading: 97 | return 0; 98 | case JJTableViewMarginTypeSectionTrailing: 99 | return 0; 100 | } 101 | } 102 | 103 | - (CGFloat)tableView:(JJTableView *)tableView heightForHeaderInSection:(NSInteger)section { 104 | if (section == 0) { 105 | return 0; 106 | } 107 | return 130; 108 | } 109 | 110 | - (UIView *)tableView:(JJTableView *)tableView viewForHeaderInSection:(NSInteger)section { 111 | if (section == 1) { 112 | UIView *headerView = [tableView dequeueReusableHeaderViewWithIdentifier:JJOldAlipayBannerHeaderIdentifier]; 113 | return headerView; 114 | } 115 | return nil; 116 | } 117 | 118 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 119 | JJBaseModel *baseModel = [self.datas[sourceIndexPath.section] objectAtIndex:sourceIndexPath.item]; 120 | [self.datas[sourceIndexPath.section] removeObjectAtIndex:sourceIndexPath.item]; 121 | [self.datas[destinationIndexPath.section] insertObject:baseModel atIndex:destinationIndexPath.item]; 122 | } 123 | 124 | - (void)tableView:(JJTableView *)tableView didClickItemCloseButtonAtIndexPath:(NSIndexPath *)indexPath { 125 | [self.datas[indexPath.section] removeObjectAtIndex:indexPath.item]; 126 | [tableView deleteItemAtIndexPath:indexPath withItemAnimation:JJTableViewItemAnimationShrink]; 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/JjOldAlipayController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJViewController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/8/19. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JJBaseViewController.h" 11 | 12 | @interface JJOldAlipayController : JJBaseViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/ImitationExample/OldAlipay/old_alipay_menu.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | url 8 | 9 | title 10 | 余额宝 11 | icon 12 | icon_01 13 | 14 | 15 | url 16 | 17 | title 18 | 转账 19 | icon 20 | icon_02 21 | 22 | 23 | url 24 | 25 | title 26 | 天猫超市 27 | icon 28 | icon_03 29 | 30 | 31 | url 32 | 33 | title 34 | 股票 35 | icon 36 | icon_04 37 | 38 | 39 | url 40 | 41 | title 42 | 我的客服 43 | icon 44 | icon_05 45 | 46 | 47 | url 48 | 49 | title 50 | 滴滴出行 51 | icon 52 | icon_06 53 | 54 | 55 | url 56 | 57 | title 58 | 手机充值 59 | icon 60 | icon_07 61 | 62 | 63 | url 64 | 65 | title 66 | 信用卡还款 67 | icon 68 | icon_08 69 | 70 | 71 | url 72 | 73 | title 74 | 生活缴费 75 | icon 76 | icon_09 77 | 78 | 79 | url 80 | 81 | title 82 | 城市服务 83 | icon 84 | icon_10 85 | 86 | 87 | url 88 | 89 | title 90 | 服务窗 91 | icon 92 | icon_11 93 | 94 | 95 | url 96 | 97 | title 98 | 我的快递 99 | icon 100 | icon_12 101 | 102 | 103 | url 104 | 105 | title 106 | 记帐本 107 | icon 108 | icon_13 109 | 110 | 111 | 112 | 113 | url 114 | 115 | title 116 | 加油服务 117 | icon 118 | icon_14 119 | 120 | 121 | url 122 | 123 | title 124 | 羊城通充值 125 | icon 126 | icon_15 127 | 128 | 129 | url 130 | 131 | title 132 | 发票管家 133 | icon 134 | icon_16 135 | 136 | 137 | url 138 | 139 | title 140 | 境外流量 141 | icon 142 | icon_17 143 | 144 | 145 | url 146 | 147 | title 148 | 红包 149 | icon 150 | icon_18 151 | 152 | 153 | url 154 | 155 | title 156 | 亲情账户 157 | icon 158 | icon_19 159 | 160 | 161 | url 162 | 163 | title 164 | 收款 165 | icon 166 | icon_20 167 | 168 | 169 | url 170 | 171 | title 172 | AA收款 173 | icon 174 | icon_21 175 | 176 | 177 | url 178 | 179 | title 180 | 亲密付 181 | icon 182 | icon_22 183 | 184 | 185 | url 186 | 187 | title 188 | 上银汇款 189 | icon 190 | icon_23 191 | 192 | 193 | url 194 | 195 | title 196 | 话费卡转让 197 | icon 198 | icon_24 199 | 200 | 201 | url 202 | 203 | title 204 | 游戏中心 205 | icon 206 | icon_25 207 | 208 | 209 | url 210 | 211 | title 212 | 世界那么大 213 | icon 214 | icon_26 215 | 216 | 217 | url 218 | 219 | title 220 | 彩票 221 | icon 222 | icon_27 223 | 224 | 225 | url 226 | 227 | title 228 | 未来蚁来 229 | icon 230 | icon_28 231 | 232 | 233 | url 234 | 235 | title 236 | 蚂蚁花呗 237 | icon 238 | icon_29 239 | 240 | 241 | url 242 | 243 | title 244 | 芝麻信用 245 | icon 246 | icon_30 247 | 248 | 249 | url 250 | 251 | title 252 | 蚂蚁聚宝 253 | icon 254 | icon_31 255 | 256 | 257 | url 258 | 259 | title 260 | 保险服务 261 | icon 262 | icon_32 263 | 264 | 265 | url 266 | 267 | title 268 | 汇率换算 269 | icon 270 | icon_33 271 | 272 | 273 | url 274 | 275 | title 276 | 理财小工具 277 | icon 278 | icon_34 279 | 280 | 281 | url 282 | 283 | title 284 | 校园生活 285 | icon 286 | icon_35 287 | 288 | 289 | url 290 | 291 | title 292 | 教育缴费 293 | icon 294 | icon_36 295 | 296 | 297 | url 298 | 299 | title 300 | 上银汇款 301 | icon 302 | icon_23 303 | 304 | 305 | url 306 | 307 | title 308 | 爱心捐款 309 | icon 310 | icon_37 311 | 312 | 313 | url 314 | 315 | title 316 | 淘票票 317 | icon 318 | icon_38 319 | 320 | 321 | url 322 | 323 | title 324 | 外卖 325 | icon 326 | icon_39 327 | 328 | 329 | url 330 | 331 | title 332 | 天猫 333 | icon 334 | icon_40 335 | 336 | 337 | url 338 | 339 | title 340 | 淘宝 341 | icon 342 | icon_41 343 | 344 | 345 | url 346 | 347 | title 348 | 机票火车票 349 | icon 350 | icon_42 351 | 352 | 353 | url 354 | 355 | title 356 | 阿里旅行 357 | icon 358 | icon_43 359 | 360 | 361 | url 362 | 363 | title 364 | 超市惠 365 | icon 366 | icon_44 367 | 368 | 369 | url 370 | 371 | title 372 | 阿里体育 373 | icon 374 | icon_45 375 | 376 | 377 | url 378 | 379 | title 380 | 虾米音乐 381 | icon 382 | icon_46 383 | 384 | 385 | url 386 | 387 | title 388 | 安全快付 389 | icon 390 | icon_47 391 | 392 | 393 | url 394 | 395 | title 396 | 云市场 397 | icon 398 | icon_48 399 | 400 | 401 | url 402 | 403 | title 404 | 易积分 405 | icon 406 | icon_49 407 | 408 | 409 | 410 | 411 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Horizental/JJHorizentalController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJHorizentalController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJHorizentalController : JJBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Horizental/JJHorizentalController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJHorizentalController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJHorizentalController.h" 10 | #import "JJBaseCell.h" 11 | 12 | @interface JJHorizentalController () 13 | 14 | @end 15 | 16 | static NSString *JJHorizentalCellIdentifier = @"JJBaseCell"; 17 | 18 | @implementation JJHorizentalController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | [super setDatasWithPlistName:@"horizental"]; 24 | 25 | self.tableView.layoutStyle = JJTableViewLayoutStyleHorizental; 26 | 27 | UINib *pagingCellNib = [UINib nibWithNibName:JJHorizentalCellIdentifier bundle:nil]; 28 | [self.tableView registerNib:pagingCellNib forCellReuseIdentifier:JJHorizentalCellIdentifier]; 29 | 30 | self.tableView.separatorStyle = JJTableViewSeparatorStyleAll; 31 | } 32 | 33 | 34 | #pragma mark - JJTableViewDataSource 35 | 36 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 37 | return self.datas.count; 38 | } 39 | 40 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 41 | return self.datas[section].count; 42 | } 43 | 44 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 45 | JJBaseCell *cell = [tableView dequeueReusableCellWithIdentifier:JJHorizentalCellIdentifier]; 46 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 47 | cell.titleLabel.text = model.title; 48 | cell.imageView.image = [UIImage imageNamed:model.icon]; 49 | 50 | return cell; 51 | } 52 | 53 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 54 | JJBaseModel *baseModel = [self.datas[sourceIndexPath.section] objectAtIndex:sourceIndexPath.item]; 55 | [self.datas[sourceIndexPath.section] removeObjectAtIndex:sourceIndexPath.item]; 56 | [self.datas[destinationIndexPath.section] insertObject:baseModel atIndex:destinationIndexPath.item]; 57 | } 58 | 59 | - (void)tableView:(JJTableView *)tableView didClickItemCloseButtonAtIndexPath:(NSIndexPath *)indexPath { 60 | [self.datas[indexPath.section] removeObjectAtIndex:indexPath.item]; 61 | [tableView deleteItemAtIndexPath:indexPath withItemAnimation:JJTableViewItemAnimationShrink]; 62 | } 63 | 64 | 65 | #pragma mark - JJTableViewDelegate 66 | 67 | - (NSUInteger)numberOfRowsInTableView:(JJTableView *)tableView { 68 | return 2; 69 | } 70 | 71 | - (nullable NSString *)tableView:(JJTableView *)tableView titleForHeaderInSection:(NSInteger)section { 72 | return self.titles[section]; 73 | } 74 | 75 | - (CGFloat)widthForCellInTableView:(JJTableView *)tableView { 76 | return 100; 77 | } 78 | 79 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 80 | switch (type) { 81 | case JJTableViewMarginTypeTop: 82 | return 10; 83 | case JJTableViewMarginTypeLeft: 84 | return 0; 85 | case JJTableViewMarginTypeRight: 86 | return 0; 87 | case JJTableViewMarginTypeBottom: 88 | return 10; 89 | case JJTableViewMarginTypeColumn: 90 | return 10; 91 | case JJTableViewMarginTypeRow: 92 | return 10; 93 | case JJTableViewMarginTypeHeaderLeading: 94 | return 0; 95 | case JJTableViewMarginTypeHeaderTrailing: 96 | return 0; 97 | case JJTableViewMarginTypeSectionLeading: 98 | return 4; 99 | case JJTableViewMarginTypeSectionTrailing: 100 | return 10; 101 | } 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Horizental/horizental.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | url 8 | 9 | status 10 | 1 11 | title 12 | 余额宝 13 | icon 14 | icon_01 15 | 16 | 17 | url 18 | 19 | status 20 | 1 21 | title 22 | 转账 23 | icon 24 | icon_02 25 | 26 | 27 | url 28 | 29 | status 30 | 1 31 | title 32 | 天猫超市 33 | icon 34 | icon_03 35 | 36 | 37 | url 38 | 39 | status 40 | 1 41 | title 42 | 股票 43 | icon 44 | icon_04 45 | 46 | 47 | url 48 | 49 | status 50 | 1 51 | title 52 | 我的客服 53 | icon 54 | icon_05 55 | 56 | 57 | url 58 | 59 | status 60 | 1 61 | title 62 | 滴滴出行 63 | icon 64 | icon_06 65 | 66 | 67 | url 68 | 69 | status 70 | 1 71 | title 72 | 手机充值 73 | icon 74 | icon_07 75 | 76 | 77 | 78 | 79 | url 80 | 81 | status 82 | 2 83 | title 84 | 信用卡还款 85 | icon 86 | icon_08 87 | 88 | 89 | url 90 | 91 | status 92 | 2 93 | title 94 | 生活缴费 95 | icon 96 | icon_09 97 | 98 | 99 | url 100 | 101 | status 102 | 2 103 | title 104 | 城市服务 105 | icon 106 | icon_10 107 | 108 | 109 | url 110 | 111 | status 112 | 2 113 | title 114 | 服务窗 115 | icon 116 | icon_11 117 | 118 | 119 | url 120 | 121 | status 122 | 2 123 | title 124 | 我的快递 125 | icon 126 | icon_12 127 | 128 | 129 | url 130 | 131 | status 132 | 2 133 | title 134 | 记帐本 135 | icon 136 | icon_13 137 | 138 | 139 | url 140 | 141 | status 142 | 2 143 | title 144 | 加油服务 145 | icon 146 | icon_14 147 | 148 | 149 | url 150 | 151 | status 152 | 2 153 | title 154 | 羊城通充值 155 | icon 156 | icon_15 157 | 158 | 159 | url 160 | 161 | status 162 | 2 163 | title 164 | 发票管家 165 | icon 166 | icon_16 167 | 168 | 169 | url 170 | 171 | status 172 | 2 173 | title 174 | 境外流量 175 | icon 176 | icon_17 177 | 178 | 179 | 180 | 181 | url 182 | 183 | status 184 | 2 185 | title 186 | 红包 187 | icon 188 | icon_18 189 | 190 | 191 | url 192 | 193 | status 194 | 2 195 | title 196 | 亲情账户 197 | icon 198 | icon_19 199 | 200 | 201 | url 202 | 203 | status 204 | 2 205 | title 206 | 收款 207 | icon 208 | icon_20 209 | 210 | 211 | url 212 | 213 | status 214 | 2 215 | title 216 | AA收款 217 | icon 218 | icon_21 219 | 220 | 221 | url 222 | 223 | status 224 | 2 225 | title 226 | 亲密付 227 | icon 228 | icon_22 229 | 230 | 231 | url 232 | 233 | status 234 | 2 235 | title 236 | 上银汇款 237 | icon 238 | icon_23 239 | 240 | 241 | url 242 | 243 | status 244 | 2 245 | title 246 | 话费卡转让 247 | icon 248 | icon_24 249 | 250 | 251 | 252 | 253 | url 254 | 255 | status 256 | 2 257 | title 258 | 游戏中心 259 | icon 260 | icon_25 261 | 262 | 263 | url 264 | 265 | status 266 | 2 267 | title 268 | 世界那么大 269 | icon 270 | icon_26 271 | 272 | 273 | url 274 | 275 | status 276 | 2 277 | title 278 | 彩票 279 | icon 280 | icon_27 281 | 282 | 283 | url 284 | 285 | status 286 | 2 287 | title 288 | 未来蚁来 289 | icon 290 | icon_28 291 | 292 | 293 | 294 | 295 | url 296 | 297 | status 298 | 2 299 | title 300 | 蚂蚁花呗 301 | icon 302 | icon_29 303 | 304 | 305 | url 306 | 307 | status 308 | 2 309 | title 310 | 芝麻信用 311 | icon 312 | icon_30 313 | 314 | 315 | url 316 | 317 | status 318 | 2 319 | title 320 | 蚂蚁聚宝 321 | icon 322 | icon_31 323 | 324 | 325 | url 326 | 327 | status 328 | 2 329 | title 330 | 保险服务 331 | icon 332 | icon_32 333 | 334 | 335 | url 336 | 337 | status 338 | 2 339 | title 340 | 汇率换算 341 | icon 342 | icon_33 343 | 344 | 345 | url 346 | 347 | status 348 | 2 349 | title 350 | 理财小工具 351 | icon 352 | icon_34 353 | 354 | 355 | 356 | 357 | url 358 | 359 | status 360 | 2 361 | title 362 | 校园生活 363 | icon 364 | icon_35 365 | 366 | 367 | url 368 | 369 | status 370 | 2 371 | title 372 | 教育缴费 373 | icon 374 | icon_36 375 | 376 | 377 | url 378 | 379 | status 380 | 2 381 | title 382 | 上银汇款 383 | icon 384 | icon_23 385 | 386 | 387 | url 388 | 389 | status 390 | 2 391 | title 392 | 爱心捐款 393 | icon 394 | icon_37 395 | 396 | 397 | 398 | 399 | url 400 | 401 | status 402 | 2 403 | title 404 | 淘票票 405 | icon 406 | icon_38 407 | 408 | 409 | url 410 | 411 | status 412 | 2 413 | title 414 | 外卖 415 | icon 416 | icon_39 417 | 418 | 419 | url 420 | 421 | status 422 | 2 423 | title 424 | 天猫 425 | icon 426 | icon_40 427 | 428 | 429 | url 430 | 431 | status 432 | 2 433 | title 434 | 淘宝 435 | icon 436 | icon_41 437 | 438 | 439 | url 440 | 441 | status 442 | 2 443 | title 444 | 机票火车票 445 | icon 446 | icon_42 447 | 448 | 449 | url 450 | 451 | status 452 | 2 453 | title 454 | 阿里旅行 455 | icon 456 | icon_43 457 | 458 | 459 | url 460 | 461 | status 462 | 2 463 | title 464 | 超市惠 465 | icon 466 | icon_44 467 | 468 | 469 | url 470 | 471 | status 472 | 2 473 | title 474 | 阿里体育 475 | icon 476 | icon_45 477 | 478 | 479 | url 480 | 481 | status 482 | 2 483 | title 484 | 虾米音乐 485 | icon 486 | icon_46 487 | 488 | 489 | url 490 | 491 | status 492 | 2 493 | title 494 | 安全快付 495 | icon 496 | icon_47 497 | 498 | 499 | url 500 | 501 | status 502 | 2 503 | title 504 | 云市场 505 | icon 506 | icon_48 507 | 508 | 509 | url 510 | 511 | status 512 | 2 513 | title 514 | 易积分 515 | icon 516 | icon_49 517 | 518 | 519 | 520 | 521 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/PagingHorizental/JJPagingHorizentalController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJPagingHorizentalController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJPagingHorizentalController : JJBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/PagingHorizental/JJPagingHorizentalController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJPagingHorizentalController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/14. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJPagingHorizentalController.h" 10 | #import "JJBaseCell.h" 11 | 12 | #define JJNumberOfCustomServiceItemInPage 8 13 | 14 | @interface JJPagingHorizentalController () 15 | 16 | @property (weak, nonatomic) IBOutlet UIPageControl *pageControl; 17 | 18 | @end 19 | 20 | static NSString *JJPagingCellIdentifier = @"JJBaseCell"; 21 | 22 | @implementation JJPagingHorizentalController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | // Do any additional setup after loading the view. 27 | [super setDatasWithPlistName:@"paging_horizental"]; 28 | 29 | self.pageControl.numberOfPages = ([[self.datas valueForKeyPath:@"@sum.@count"] intValue] + JJNumberOfCustomServiceItemInPage - 1) / JJNumberOfCustomServiceItemInPage; 30 | 31 | self.tableView.pagingEnabled = YES; 32 | self.tableView.layoutStyle = JJTableViewLayoutStylePagingHorizental; 33 | 34 | UINib *pagingCellNib = [UINib nibWithNibName:JJPagingCellIdentifier bundle:nil]; 35 | [self.tableView registerNib:pagingCellNib forCellReuseIdentifier:JJPagingCellIdentifier]; 36 | } 37 | 38 | 39 | #pragma mark - JJTableViewDataSource 40 | 41 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 42 | return self.datas.count; 43 | } 44 | 45 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 46 | return self.datas[section].count; 47 | } 48 | 49 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 50 | JJBaseCell *cell = [tableView dequeueReusableCellWithIdentifier:JJPagingCellIdentifier]; 51 | 52 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 53 | cell.titleLabel.text = model.title; 54 | cell.imageView.image = [UIImage imageNamed:model.icon]; 55 | 56 | return cell; 57 | } 58 | 59 | 60 | #pragma mark - JJTableViewDelegate 61 | 62 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 63 | return 4; 64 | } 65 | 66 | - (NSUInteger)numberOfRowsInTableView:(JJTableView *)tableView { 67 | return 2; 68 | } 69 | 70 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 71 | double doublePage = scrollView.contentOffset.x / scrollView.frame.size.width; 72 | int page = doublePage + 0.5; 73 | self.pageControl.currentPage = page; 74 | } 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/PagingHorizental/paging_horizental.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | url 8 | 9 | title 10 | 余额宝 11 | icon 12 | icon_01 13 | 14 | 15 | url 16 | 17 | title 18 | 转账 19 | icon 20 | icon_02 21 | 22 | 23 | url 24 | 25 | title 26 | 天猫超市 27 | icon 28 | icon_03 29 | 30 | 31 | url 32 | 33 | title 34 | 股票 35 | icon 36 | icon_04 37 | 38 | 39 | url 40 | 41 | title 42 | 我的客服 43 | icon 44 | icon_05 45 | 46 | 47 | url 48 | 49 | title 50 | 滴滴出行 51 | icon 52 | icon_06 53 | 54 | 55 | url 56 | 57 | title 58 | 手机充值 59 | icon 60 | icon_07 61 | 62 | 63 | url 64 | 65 | title 66 | 信用卡还款 67 | icon 68 | icon_08 69 | 70 | 71 | url 72 | 73 | title 74 | 生活缴费 75 | icon 76 | icon_09 77 | 78 | 79 | url 80 | 81 | title 82 | 城市服务 83 | icon 84 | icon_10 85 | 86 | 87 | url 88 | 89 | title 90 | 服务窗 91 | icon 92 | icon_11 93 | 94 | 95 | url 96 | 97 | title 98 | 我的快递 99 | icon 100 | icon_12 101 | 102 | 103 | url 104 | 105 | title 106 | 记帐本 107 | icon 108 | icon_13 109 | 110 | 111 | 112 | 113 | url 114 | 115 | title 116 | 加油服务 117 | icon 118 | icon_14 119 | 120 | 121 | url 122 | 123 | title 124 | 羊城通充值 125 | icon 126 | icon_15 127 | 128 | 129 | url 130 | 131 | title 132 | 发票管家 133 | icon 134 | icon_16 135 | 136 | 137 | url 138 | 139 | title 140 | 境外流量 141 | icon 142 | icon_17 143 | 144 | 145 | url 146 | 147 | title 148 | 红包 149 | icon 150 | icon_18 151 | 152 | 153 | url 154 | 155 | title 156 | 亲情账户 157 | icon 158 | icon_19 159 | 160 | 161 | url 162 | 163 | title 164 | 收款 165 | icon 166 | icon_20 167 | 168 | 169 | url 170 | 171 | title 172 | AA收款 173 | icon 174 | icon_21 175 | 176 | 177 | url 178 | 179 | title 180 | 亲密付 181 | icon 182 | icon_22 183 | 184 | 185 | url 186 | 187 | title 188 | 上银汇款 189 | icon 190 | icon_23 191 | 192 | 193 | url 194 | 195 | title 196 | 话费卡转让 197 | icon 198 | icon_24 199 | 200 | 201 | url 202 | 203 | title 204 | 游戏中心 205 | icon 206 | icon_25 207 | 208 | 209 | url 210 | 211 | title 212 | 世界那么大 213 | icon 214 | icon_26 215 | 216 | 217 | url 218 | 219 | title 220 | 彩票 221 | icon 222 | icon_27 223 | 224 | 225 | url 226 | 227 | title 228 | 未来蚁来 229 | icon 230 | icon_28 231 | 232 | 233 | url 234 | 235 | title 236 | 蚂蚁花呗 237 | icon 238 | icon_29 239 | 240 | 241 | url 242 | 243 | title 244 | 芝麻信用 245 | icon 246 | icon_30 247 | 248 | 249 | url 250 | 251 | title 252 | 蚂蚁聚宝 253 | icon 254 | icon_31 255 | 256 | 257 | url 258 | 259 | title 260 | 保险服务 261 | icon 262 | icon_32 263 | 264 | 265 | url 266 | 267 | title 268 | 汇率换算 269 | icon 270 | icon_33 271 | 272 | 273 | url 274 | 275 | title 276 | 理财小工具 277 | icon 278 | icon_34 279 | 280 | 281 | url 282 | 283 | title 284 | 校园生活 285 | icon 286 | icon_35 287 | 288 | 289 | url 290 | 291 | title 292 | 教育缴费 293 | icon 294 | icon_36 295 | 296 | 297 | url 298 | 299 | title 300 | 上银汇款 301 | icon 302 | icon_23 303 | 304 | 305 | url 306 | 307 | title 308 | 爱心捐款 309 | icon 310 | icon_37 311 | 312 | 313 | url 314 | 315 | title 316 | 淘票票 317 | icon 318 | icon_38 319 | 320 | 321 | url 322 | 323 | title 324 | 外卖 325 | icon 326 | icon_39 327 | 328 | 329 | url 330 | 331 | title 332 | 天猫 333 | icon 334 | icon_40 335 | 336 | 337 | url 338 | 339 | title 340 | 淘宝 341 | icon 342 | icon_41 343 | 344 | 345 | url 346 | 347 | title 348 | 机票火车票 349 | icon 350 | icon_42 351 | 352 | 353 | url 354 | 355 | title 356 | 阿里旅行 357 | icon 358 | icon_43 359 | 360 | 361 | url 362 | 363 | title 364 | 超市惠 365 | icon 366 | icon_44 367 | 368 | 369 | url 370 | 371 | title 372 | 阿里体育 373 | icon 374 | icon_45 375 | 376 | 377 | url 378 | 379 | title 380 | 虾米音乐 381 | icon 382 | icon_46 383 | 384 | 385 | url 386 | 387 | title 388 | 安全快付 389 | icon 390 | icon_47 391 | 392 | 393 | url 394 | 395 | title 396 | 云市场 397 | icon 398 | icon_48 399 | 400 | 401 | url 402 | 403 | title 404 | 易积分 405 | icon 406 | icon_49 407 | 408 | 409 | 410 | 411 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Vartical/JJVarticalController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJVarticalController.h 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/18. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJBaseViewController.h" 10 | 11 | @interface JJVarticalController : JJBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Vartical/JJVarticalController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJVarticalController.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/18. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import "JJVarticalController.h" 10 | #import "JJBaseCell.h" 11 | 12 | @interface JJVarticalController () 13 | 14 | @end 15 | 16 | static NSString *JJHorizentalCellIdentifier = @"JJBaseCell"; 17 | 18 | @implementation JJVarticalController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | [super setDatasWithPlistName:@"vartical"]; 24 | 25 | UINib *pagingCellNib = [UINib nibWithNibName:JJHorizentalCellIdentifier bundle:nil]; 26 | [self.tableView registerNib:pagingCellNib forCellReuseIdentifier:JJHorizentalCellIdentifier]; 27 | 28 | self.tableView.separatorStyle = JJTableViewSeparatorStyleAll; 29 | } 30 | 31 | #pragma mark - JJTableViewDataSource 32 | 33 | - (NSInteger)numberOfSectionsInTableView:(JJTableView *)tableView { 34 | return self.datas.count; 35 | } 36 | 37 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 38 | return self.datas[section].count; 39 | } 40 | 41 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 42 | JJBaseCell *cell = [tableView dequeueReusableCellWithIdentifier:JJHorizentalCellIdentifier]; 43 | JJBaseModel *model = self.datas[indexPath.section][indexPath.item]; 44 | cell.titleLabel.text = model.title; 45 | cell.imageView.image = [UIImage imageNamed:model.icon]; 46 | 47 | return cell; 48 | } 49 | 50 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 51 | JJBaseModel *baseModel = [self.datas[sourceIndexPath.section] objectAtIndex:sourceIndexPath.item]; 52 | [self.datas[sourceIndexPath.section] removeObjectAtIndex:sourceIndexPath.item]; 53 | [self.datas[destinationIndexPath.section] insertObject:baseModel atIndex:destinationIndexPath.item]; 54 | } 55 | 56 | - (void)tableView:(JJTableView *)tableView didClickItemCloseButtonAtIndexPath:(NSIndexPath *)indexPath { 57 | [self.datas[indexPath.section] removeObjectAtIndex:indexPath.item]; 58 | [tableView deleteItemAtIndexPath:indexPath withItemAnimation:JJTableViewItemAnimationShrink]; 59 | } 60 | 61 | 62 | #pragma mark - JJTableViewDelegate 63 | 64 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 65 | return 3; 66 | } 67 | 68 | - (nullable NSString *)tableView:(JJTableView *)tableView titleForHeaderInSection:(NSInteger)section { 69 | return self.titles[section]; 70 | } 71 | 72 | - (CGFloat)heightForCellInTableView:(JJTableView *)tableView { 73 | return 100; 74 | } 75 | 76 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 77 | switch (type) { 78 | case JJTableViewMarginTypeTop: 79 | return 10; 80 | case JJTableViewMarginTypeLeft: 81 | return 8; 82 | case JJTableViewMarginTypeRight: 83 | return 8; 84 | case JJTableViewMarginTypeBottom: 85 | return 0; 86 | case JJTableViewMarginTypeColumn: 87 | return 0; 88 | case JJTableViewMarginTypeRow: 89 | return 0; 90 | case JJTableViewMarginTypeHeaderLeading: 91 | return 0; 92 | case JJTableViewMarginTypeHeaderTrailing: 93 | return 0; 94 | case JJTableViewMarginTypeSectionLeading: 95 | return 10; 96 | case JJTableViewMarginTypeSectionTrailing: 97 | return 10; 98 | } 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/StyleExample/Vartical/vartical.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | url 8 | 9 | status 10 | 1 11 | title 12 | 余额宝 13 | icon 14 | icon_01 15 | 16 | 17 | url 18 | 19 | status 20 | 1 21 | title 22 | 转账 23 | icon 24 | icon_02 25 | 26 | 27 | url 28 | 29 | status 30 | 1 31 | title 32 | 天猫超市 33 | icon 34 | icon_03 35 | 36 | 37 | url 38 | 39 | status 40 | 1 41 | title 42 | 股票 43 | icon 44 | icon_04 45 | 46 | 47 | url 48 | 49 | status 50 | 1 51 | title 52 | 我的客服 53 | icon 54 | icon_05 55 | 56 | 57 | url 58 | 59 | status 60 | 1 61 | title 62 | 滴滴出行 63 | icon 64 | icon_06 65 | 66 | 67 | url 68 | 69 | status 70 | 1 71 | title 72 | 手机充值 73 | icon 74 | icon_07 75 | 76 | 77 | 78 | 79 | url 80 | 81 | status 82 | 2 83 | title 84 | 信用卡还款 85 | icon 86 | icon_08 87 | 88 | 89 | url 90 | 91 | status 92 | 2 93 | title 94 | 生活缴费 95 | icon 96 | icon_09 97 | 98 | 99 | url 100 | 101 | status 102 | 2 103 | title 104 | 城市服务 105 | icon 106 | icon_10 107 | 108 | 109 | url 110 | 111 | status 112 | 2 113 | title 114 | 服务窗 115 | icon 116 | icon_11 117 | 118 | 119 | url 120 | 121 | status 122 | 2 123 | title 124 | 我的快递 125 | icon 126 | icon_12 127 | 128 | 129 | url 130 | 131 | status 132 | 2 133 | title 134 | 记帐本 135 | icon 136 | icon_13 137 | 138 | 139 | url 140 | 141 | status 142 | 2 143 | title 144 | 加油服务 145 | icon 146 | icon_14 147 | 148 | 149 | url 150 | 151 | status 152 | 2 153 | title 154 | 羊城通充值 155 | icon 156 | icon_15 157 | 158 | 159 | url 160 | 161 | status 162 | 2 163 | title 164 | 发票管家 165 | icon 166 | icon_16 167 | 168 | 169 | url 170 | 171 | status 172 | 2 173 | title 174 | 境外流量 175 | icon 176 | icon_17 177 | 178 | 179 | 180 | 181 | url 182 | 183 | status 184 | 2 185 | title 186 | 红包 187 | icon 188 | icon_18 189 | 190 | 191 | url 192 | 193 | status 194 | 2 195 | title 196 | 亲情账户 197 | icon 198 | icon_19 199 | 200 | 201 | url 202 | 203 | status 204 | 2 205 | title 206 | 收款 207 | icon 208 | icon_20 209 | 210 | 211 | url 212 | 213 | status 214 | 2 215 | title 216 | AA收款 217 | icon 218 | icon_21 219 | 220 | 221 | url 222 | 223 | status 224 | 2 225 | title 226 | 亲密付 227 | icon 228 | icon_22 229 | 230 | 231 | url 232 | 233 | status 234 | 2 235 | title 236 | 上银汇款 237 | icon 238 | icon_23 239 | 240 | 241 | url 242 | 243 | status 244 | 2 245 | title 246 | 话费卡转让 247 | icon 248 | icon_24 249 | 250 | 251 | 252 | 253 | url 254 | 255 | status 256 | 2 257 | title 258 | 游戏中心 259 | icon 260 | icon_25 261 | 262 | 263 | url 264 | 265 | status 266 | 2 267 | title 268 | 世界那么大 269 | icon 270 | icon_26 271 | 272 | 273 | url 274 | 275 | status 276 | 2 277 | title 278 | 彩票 279 | icon 280 | icon_27 281 | 282 | 283 | url 284 | 285 | status 286 | 2 287 | title 288 | 未来蚁来 289 | icon 290 | icon_28 291 | 292 | 293 | 294 | 295 | url 296 | 297 | status 298 | 2 299 | title 300 | 蚂蚁花呗 301 | icon 302 | icon_29 303 | 304 | 305 | url 306 | 307 | status 308 | 2 309 | title 310 | 芝麻信用 311 | icon 312 | icon_30 313 | 314 | 315 | url 316 | 317 | status 318 | 2 319 | title 320 | 蚂蚁聚宝 321 | icon 322 | icon_31 323 | 324 | 325 | url 326 | 327 | status 328 | 2 329 | title 330 | 保险服务 331 | icon 332 | icon_32 333 | 334 | 335 | url 336 | 337 | status 338 | 2 339 | title 340 | 汇率换算 341 | icon 342 | icon_33 343 | 344 | 345 | url 346 | 347 | status 348 | 2 349 | title 350 | 理财小工具 351 | icon 352 | icon_34 353 | 354 | 355 | 356 | 357 | url 358 | 359 | status 360 | 2 361 | title 362 | 校园生活 363 | icon 364 | icon_35 365 | 366 | 367 | url 368 | 369 | status 370 | 2 371 | title 372 | 教育缴费 373 | icon 374 | icon_36 375 | 376 | 377 | url 378 | 379 | status 380 | 2 381 | title 382 | 上银汇款 383 | icon 384 | icon_23 385 | 386 | 387 | url 388 | 389 | status 390 | 2 391 | title 392 | 爱心捐款 393 | icon 394 | icon_37 395 | 396 | 397 | 398 | 399 | url 400 | 401 | status 402 | 2 403 | title 404 | 淘票票 405 | icon 406 | icon_38 407 | 408 | 409 | url 410 | 411 | status 412 | 2 413 | title 414 | 外卖 415 | icon 416 | icon_39 417 | 418 | 419 | url 420 | 421 | status 422 | 2 423 | title 424 | 天猫 425 | icon 426 | icon_40 427 | 428 | 429 | url 430 | 431 | status 432 | 2 433 | title 434 | 淘宝 435 | icon 436 | icon_41 437 | 438 | 439 | url 440 | 441 | status 442 | 2 443 | title 444 | 机票火车票 445 | icon 446 | icon_42 447 | 448 | 449 | url 450 | 451 | status 452 | 2 453 | title 454 | 阿里旅行 455 | icon 456 | icon_43 457 | 458 | 459 | url 460 | 461 | status 462 | 2 463 | title 464 | 超市惠 465 | icon 466 | icon_44 467 | 468 | 469 | url 470 | 471 | status 472 | 2 473 | title 474 | 阿里体育 475 | icon 476 | icon_45 477 | 478 | 479 | url 480 | 481 | status 482 | 2 483 | title 484 | 虾米音乐 485 | icon 486 | icon_46 487 | 488 | 489 | url 490 | 491 | status 492 | 2 493 | title 494 | 安全快付 495 | icon 496 | icon_47 497 | 498 | 499 | url 500 | 501 | status 502 | 2 503 | title 504 | 云市场 505 | icon 506 | icon_48 507 | 508 | 509 | url 510 | 511 | status 512 | 2 513 | title 514 | 易积分 515 | icon 516 | icon_49 517 | 518 | 519 | 520 | 521 | -------------------------------------------------------------------------------- /Example/JJTableViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JJTableViewExample 4 | // 5 | // Created by jkenny on 16/9/26. 6 | // Copyright © 2016年 Jkenny. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /JJTableView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "JJTableView" 3 | s.version = "0.1.1" 4 | s.summary = "Support Interactive Reordering TableView." 5 | s.license = { :type => "MIT", :file => "LICENSE" } 6 | s.authors = { "Jkenny" => "jkenny.cn@gmail.com" } 7 | s.social_media_url = "http://jkenny.cn" 8 | s.homepage = 'https://github.com/ynnekj/JJTableView' 9 | s.platform = :ios, '6.0' 10 | s.ios.deployment_target = '6.0' 11 | s.source = { :git => 'https://github.com/ynnekj/JJTableView.git', :tag => s.version.to_s } 12 | 13 | s.requires_arc = true 14 | s.source_files = "JJTableView/**/*.{h,m}" 15 | s.public_header_files = "JJTableView/**/*.{h}" 16 | 17 | s.frameworks = "UIKit" 18 | 19 | end 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jkenny 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JJTableView 2 | Support Interactive Reordering TableView 3 | 4 | 5 | # 中文介绍 6 | 支持拖拽重排简单易用,你可以将它当作 UITableView、UICollectionView 来使用。 7 | 8 | 9 | 10 | 11 | # 特性 12 | - 支持拖拽重排 13 | - 支持控制单个 cell 是否支持拖拽重排 14 | - 支持控制正在拖拽的 cell 是否允许拖拽到指定位置 15 | - 每个 cell 自带一个删除按钮 16 | - 支持行数列数控制 17 | - 适当情况下支持 cell 的宽高控制 18 | - 支持各位置的 margin 控制 19 | - 内部自带分界线可控制 20 | - 支持所有 UIView 及其子类作为 cell 或 header view 21 | - 支持 cell 和 header view 的复用 22 | - 支持三种布局排列 23 | 24 | # 用法 25 | 26 | ### 基本使用 27 | 28 | // 设置数据源 29 | self.tableView.dataSource = self; 30 | 31 | // 使用 nib 或 class 注册 cell 32 | static NSString *JKCellIdentifier = @"JKBaseCell"; 33 | UINib *pagingCellNib = [UINib nibWithNibName:@"JKBaseCell" bundle:nil]; 34 | [self.tableView registerNib:pagingCellNib forCellReuseIdentifier:JKCellIdentifier]; 35 | 36 | // 实现数据源方法 37 | - (NSInteger)tableView:(JJTableView *)tableView numberOfItemsInSection:(NSInteger)section { 38 | return self.datas.count; 39 | } 40 | 41 | - (UIView *)tableView:(JJTableView *)tableView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 42 | JKBaseCell *cell = [tableView dequeueReusableCellWithIdentifier:JKCellIdentifier]; 43 | return cell; 44 | } 45 | 46 | ### 拖拽重排 47 | 48 | // 实现数据源的这个方法来支持拖拽重排 49 | - (void)tableView:(JJTableView *)tableView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 50 | // 必须在该方法中更新数据源,否则可能发生数据源与当前显示的数据不一致导致错误发生。 51 | JKBaseModel *baseModel = self.datas[sourceIndexPath.item]; 52 | [self.datas removeObjectAtIndex:sourceIndexPath.item]; 53 | [self.datas insertObject:baseModel atIndex:destinationIndexPath.item]; 54 | } 55 | 56 | ### 拖拽重排控制 57 | 58 | // 实现数据源这个方法来控制单个 cell 是否支持拖拽 59 | - (BOOL)tableView:(JJTableView *)tableView canLongPressAndMoveItemAtIndexPath:(NSIndexPath *)indexPath { 60 | // 禁止第一个 cell 进行拖拽 61 | if (indexPath.item == 0) { 62 | return NO; 63 | } 64 | return YES; 65 | } 66 | 67 | // 实现数据源这个方法来控制正在拖拽的 cell 是否允许拖拽到指定位置 68 | - (BOOL)tableView:(JJTableView *)tableView canMoveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath*)destinationIndexPath { 69 | // 禁止其它位置的 cell 拖拽到第一个 cell 的位置 70 | if (destinationIndexPath.item == 0) { 71 | return NO; 72 | } 73 | return YES; 74 | } 75 | 76 | ### 显示 header view 77 | // 设置代理 78 | self.tableView.delegate = self; 79 | // 使用 nib 或 class 注册 header view 80 | static NSString *JKHeaderIdentifier = @"JKHeaderView"; 81 | UINib *headerNib = [UINib nibWithNibName:@"JKHeaderView" bundle:nil]; 82 | [self.tableView registerNib:headerNib forHeaderViewReuseIdentifier:JKHeaderIdentifier]; 83 | 84 | // 实现下列代理方法中的任何一个都可以导致 header view 显示 85 | 86 | // 返回对应 section 的自定义 header view 87 | - (UIView *)tableView:(JJTableView *)tableView viewForHeaderInSection:(NSInteger)section { 88 | JKHeaderView *headerView = [tableView dequeueReusableHeaderViewWithIdentifier:JKHeaderIdentifier]; 89 | return headerView; 90 | } 91 | 92 | // 返回对应 section 的 默认 header view 的 title 93 | - (nullable NSString *)tableView:(JJTableView *)tableView titleForHeaderInSection:(NSInteger)section { 94 | return self.titles[section]; 95 | } 96 | 97 | // 在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleVartical 时实现这个方法才有效 98 | - (CGFloat)tableView:(JJTableView *)tableView heightForHeaderInSection:(NSInteger)section { 99 | return 44; 100 | } 101 | 102 | // 在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleHorizental 时实现这个方法才有效 103 | - (CGFloat)tableView:(JJTableView *)tableView widthForHeaderInSection:(NSInteger)section { 104 | return 44; 105 | } 106 | 107 | ### 控制行列宽高边距 108 | 109 | // 设置代理 110 | self.tableView.delegate = self; 111 | 112 | // 一共有多少行,在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleHorizental 时实现这个方法才有效 113 | - (NSUInteger)numberOfRowsInTableView:(JJTableView *)tableView { 114 | return 4; 115 | } 116 | 117 | // 一共有多少列,在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleVartical 时实现这个方法才有效 118 | - (NSUInteger)numberOfColunmsInTableView:(JJTableView *)tableView { 119 | return 3; 120 | } 121 | 122 | // 返回 cell 的宽度,在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleHorizental 时实现这个方法才有效 123 | - (CGFloat)widthForCellInTableView:(JJTableView *)tableView { 124 | return 180; 125 | } 126 | 127 | // 返回 cell 的高度,在 JJTableViewLayoutStyle 等于 JJTableViewLayoutStyleVartical 时实现这个方法才有效 128 | - (CGFloat)heightForCellInTableView:(JJTableView *)tableView { 129 | return 44; 130 | } 131 | 132 | // 根据对应的 type 类型返回对应的 margin 大小 133 | - (CGFloat)tableView:(JJTableView *)tableView marginForType:(JJTableViewMarginType)type { 134 | switch (type) { 135 | case JJTableViewMarginTypeTop: 136 | return 10; 137 | case JJTableViewMarginTypeLeft: 138 | return 10; 139 | case JJTableViewMarginTypeRight: 140 | return 10; 141 | case JJTableViewMarginTypeBottom: 142 | return 0; 143 | case JJTableViewMarginTypeColumn: 144 | return 0; 145 | case JJTableViewMarginTypeRow: 146 | return 0; 147 | case JJTableViewMarginTypeHeaderLeading: 148 | return 0; 149 | case JJTableViewMarginTypeHeaderTrailing: 150 | return 0; 151 | case JJTableViewMarginTypeSectionLeading: 152 | return 10; 153 | case JJTableViewMarginTypeSectionTrailing: 154 | return 10; 155 | } 156 | } 157 | 158 | ### 设置样式 159 | 160 | // 设置布局样式 161 | self.tableView.layoutStyle = JJTableViewLayoutStyleVartical; 162 | // 设置分割线样式 163 | self.tableView.separatorStyle = JJTableViewSeparatorStyleAll; 164 | 165 | ### 更多示例 166 | 查看演示工程 `Example/JJTableViewExample.xcodeproj` 167 | 168 | # 安装 169 | 170 | ### CocoaPods 171 | 172 | 1. 在 Podfile 中添加 `pod 'JJTableView'`。 173 | 2. 执行 `pod install`。 174 | 3. 导入 \ 175 | 176 | 177 | # 许可证 178 | JJTableView 使用 MIT 许可证,详情见 LICENSE 文件。 179 | 180 | --------------------------------------------------------------------------------