├── .swift-version
├── Demo
├── NormalExample.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── jay.xcuserdatad
│ │ └── IDEFindNavigatorScopes.plist
└── NormalExample
│ ├── NormalExample.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── NormalExample.xcscheme
│ └── NormalExample
│ ├── AutomaticHeight
│ ├── AutomaticHeightCell
│ │ ├── AutomaticHeightCell.swift
│ │ └── AutomaticHeightCell.xib
│ ├── AutomaticHeightViewController.swift
│ └── Data.swift
│ ├── Basic
│ ├── BasicViewController.swift
│ ├── Cells
│ │ ├── ZJSwitchCell.swift
│ │ ├── ZJSwitchCell.xib
│ │ ├── ZJTextCell.swift
│ │ ├── ZJTextCell.xib
│ │ ├── ZJTextFieldCell.swift
│ │ └── ZJTextFieldCell.xib
│ └── CustomHeader
│ │ ├── CustomSectionHeaderView.swift
│ │ └── CustomSectionHeaderView.xib
│ ├── EditingViewController.swift
│ ├── ExpandTree
│ ├── Cells
│ │ ├── CustomExpandButtonCell.swift
│ │ ├── CustomExpandButtonCell.xib
│ │ ├── Level0Cell.swift
│ │ ├── Level0Cell.xib
│ │ ├── Level1Cell.swift
│ │ ├── Level1Cell.xib
│ │ ├── Level2Cell.swift
│ │ ├── Level2Cell.xib
│ │ ├── Level3Cell.swift
│ │ └── Level3Cell.xib
│ └── ExpandTreeViewController.swift
│ ├── Resource
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── 1.imageset
│ │ │ ├── 1.jpeg
│ │ │ └── Contents.json
│ │ ├── 2.imageset
│ │ │ ├── 2.jpg
│ │ │ └── Contents.json
│ │ ├── 3.imageset
│ │ │ ├── 3.jpg
│ │ │ └── Contents.json
│ │ ├── 4.imageset
│ │ │ ├── 4.jpeg
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── card.imageset
│ │ │ ├── 068588f6-7747-455a-8ee3-6519f4890a9c.png
│ │ │ └── Contents.json
│ │ └── checkmark.imageset
│ │ │ ├── Contents.json
│ │ │ └── checkmark.png
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── FPS
│ │ ├── YYFPSLabel.h
│ │ ├── YYFPSLabel.m
│ │ ├── YYWeakProxy.h
│ │ └── YYWeakProxy.m
│ ├── Info-manager.plist
│ ├── NormalExample-Bridging-Header.h
│ ├── ZJBaseTableViewController.swift
│ ├── ZJTextView.swift
│ └── test.m
│ ├── RetractableViewController.swift
│ ├── SectionsViewController.swift
│ ├── Selection
│ ├── SelectionCell.swift
│ ├── SelectionCell.xib
│ └── SelectionViewController.swift
│ ├── UpdateHeight
│ ├── CardTableViewCell.swift
│ ├── CardTableViewCell.xib
│ └── UpdateHeightViewController.swift
│ ├── ViewController.swift
│ └── ZJTableViewManager
│ ├── ZJTableViewManager.xcodeproj
│ └── project.pbxproj
│ └── ZJTableViewManager
│ ├── Info.plist
│ └── ZJTableViewManager.h
├── FILE_LICENSE
├── Other Demo
├── CommentsWithPicture
│ ├── CommentsWithPicture.xcodeproj
│ │ └── project.pbxproj
│ └── CommentsWithPicture
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── delete.imageset
│ │ │ ├── Contents.json
│ │ │ ├── attachment_Delete@2x.png
│ │ │ └── attachment_Delete@3x.png
│ │ ├── demo_image_1.imageset
│ │ │ ├── Contents.json
│ │ │ └── demo_image_1.jpg
│ │ ├── demo_image_2.imageset
│ │ │ ├── Contents.json
│ │ │ └── demo_image_2.jpg
│ │ ├── demo_image_3.imageset
│ │ │ ├── Contents.json
│ │ │ └── demo_image_3.jpg
│ │ ├── demo_image_4.imageset
│ │ │ ├── Contents.json
│ │ │ └── demo_image_4.jpg
│ │ ├── demo_image_5.imageset
│ │ │ ├── Contents.json
│ │ │ └── demo_image_5.jpg
│ │ ├── empty_star.imageset
│ │ │ ├── Contents.json
│ │ │ ├── empty_star@2x.png
│ │ │ └── empty_star@3x.png
│ │ ├── fill_star.imageset
│ │ │ ├── Contents.json
│ │ │ ├── file_star@2x.png
│ │ │ └── file_star@3x.png
│ │ ├── goods.imageset
│ │ │ ├── 780c7aa90b3b844abb3ece7ea7b7e046@2x.png
│ │ │ ├── 780c7aa90b3b844abb3ece7ea7b7e046@3x.png
│ │ │ └── Contents.json
│ │ └── picture_add.imageset
│ │ │ ├── Contents.json
│ │ │ ├── picture_add@2x.png
│ │ │ └── picture_add@3x.png
│ │ ├── Cells
│ │ ├── Cells
│ │ │ ├── ZJSwitchCell.swift
│ │ │ ├── ZJSwitchCell.xib
│ │ │ ├── ZJTextCell.swift
│ │ │ ├── ZJTextCell.xib
│ │ │ ├── ZJTextFieldCell.swift
│ │ │ └── ZJTextFieldCell.xib
│ │ ├── OrderEvaluateCell.swift
│ │ ├── OrderEvaluateCell.xib
│ │ ├── ZJPictureCollectionCell.swift
│ │ ├── ZJPictureCollectionCell.xib
│ │ ├── ZJPictureTableCell.swift
│ │ ├── ZJTextCell.swift
│ │ ├── ZJTextCell.xib
│ │ └── ZJTextView.swift
│ │ ├── LaunchScreen.storyboard
│ │ ├── Main.storyboard
│ │ ├── ViewController.swift
│ │ └── comments-Info.plist
├── Podfile
├── Podfile.lock
├── Pods
│ ├── IQKeyboardManagerSwift
│ │ ├── IQKeyboardManagerSwift
│ │ │ ├── Categories
│ │ │ │ ├── IQNSArray+Sort.swift
│ │ │ │ ├── IQUIScrollView+Additions.swift
│ │ │ │ ├── IQUITextFieldView+Additions.swift
│ │ │ │ ├── IQUIView+Hierarchy.swift
│ │ │ │ └── IQUIViewController+Additions.swift
│ │ │ ├── Constants
│ │ │ │ ├── IQKeyboardManagerConstants.swift
│ │ │ │ └── IQKeyboardManagerConstantsInternal.swift
│ │ │ ├── IQKeyboardManager.swift
│ │ │ ├── IQKeyboardReturnKeyHandler.swift
│ │ │ ├── IQTextView
│ │ │ │ └── IQTextView.swift
│ │ │ └── IQToolbar
│ │ │ │ ├── IQBarButtonItem.swift
│ │ │ │ ├── IQInvocation.swift
│ │ │ │ ├── IQPreviousNextView.swift
│ │ │ │ ├── IQTitleBarButtonItem.swift
│ │ │ │ ├── IQToolbar.swift
│ │ │ │ └── IQUIView+IQKeyboardToolbar.swift
│ │ ├── LICENSE.md
│ │ └── README.md
│ ├── ImagePicker
│ │ ├── Images
│ │ │ ├── AUTO@3x.png
│ │ │ ├── OFF@3x.png
│ │ │ ├── ON@3x.png
│ │ │ ├── cameraIcon@3x.png
│ │ │ ├── focusIcon@3x.png
│ │ │ ├── selectedImageGallery@3x.png
│ │ │ └── video@3x.png
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ └── Source
│ │ │ ├── AssetManager.swift
│ │ │ ├── BottomView
│ │ │ ├── BottomContainerView.swift
│ │ │ ├── ButtonPicker.swift
│ │ │ ├── ImageStack.swift
│ │ │ └── StackView.swift
│ │ │ ├── CameraView
│ │ │ ├── CameraMan.swift
│ │ │ └── CameraView.swift
│ │ │ ├── Configuration.swift
│ │ │ ├── Extensions
│ │ │ └── ConstraintsSetup.swift
│ │ │ ├── Helper.swift
│ │ │ ├── ImageGallery
│ │ │ ├── ImageGalleryLayout.swift
│ │ │ ├── ImageGalleryView.swift
│ │ │ ├── ImageGalleryViewCell.swift
│ │ │ ├── ImageGalleryViewDataSource.swift
│ │ │ └── VideoInfoView.swift
│ │ │ ├── ImagePickerController.swift
│ │ │ ├── LocationManager.swift
│ │ │ └── TopView
│ │ │ └── TopView.swift
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ └── project.pbxproj
│ ├── SKPhotoBrowser
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── SKPhotoBrowser
│ │ │ ├── SKActionView.swift
│ │ │ ├── SKAnimator.swift
│ │ │ ├── SKButtons.swift
│ │ │ ├── SKCache.swift
│ │ │ ├── SKCacheable.swift
│ │ │ ├── SKCaptionView.swift
│ │ │ ├── SKDetectingImageView.swift
│ │ │ ├── SKDetectingView.swift
│ │ │ ├── SKIndicatorView.swift
│ │ │ ├── SKLocalPhoto.swift
│ │ │ ├── SKMesurement.swift
│ │ │ ├── SKPaginationView.swift
│ │ │ ├── SKPagingScrollView.swift
│ │ │ ├── SKPhoto.swift
│ │ │ ├── SKPhotoBrowser.bundle
│ │ │ └── images
│ │ │ │ ├── btn_common_back_wh.png
│ │ │ │ ├── btn_common_back_wh@2x.png
│ │ │ │ ├── btn_common_back_wh@3x.png
│ │ │ │ ├── btn_common_close_wh.png
│ │ │ │ ├── btn_common_close_wh@2x.png
│ │ │ │ ├── btn_common_close_wh@3x.png
│ │ │ │ ├── btn_common_delete_wh.png
│ │ │ │ ├── btn_common_delete_wh@2x.png
│ │ │ │ ├── btn_common_delete_wh@3x.png
│ │ │ │ ├── btn_common_forward_wh.png
│ │ │ │ ├── btn_common_forward_wh@2x.png
│ │ │ │ └── btn_common_forward_wh@3x.png
│ │ │ ├── SKPhotoBrowser.h
│ │ │ ├── SKPhotoBrowser.swift
│ │ │ ├── SKPhotoBrowserDelegate.swift
│ │ │ ├── SKPhotoBrowserOptions.swift
│ │ │ ├── SKToolbar.swift
│ │ │ ├── SKZoomingScrollView.swift
│ │ │ ├── UIApplication+UIWindow.swift
│ │ │ └── extensions
│ │ │ ├── UIImage+Rotation.swift
│ │ │ └── UIView+Radius.swift
│ ├── SwiftyStarRatingView
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── Source
│ │ │ └── SwiftyStarRatingView.swift
│ ├── Target Support Files
│ │ ├── IQKeyboardManagerSwift
│ │ │ ├── IQKeyboardManagerSwift-Info.plist
│ │ │ ├── IQKeyboardManagerSwift-dummy.m
│ │ │ ├── IQKeyboardManagerSwift-prefix.pch
│ │ │ ├── IQKeyboardManagerSwift-umbrella.h
│ │ │ ├── IQKeyboardManagerSwift.modulemap
│ │ │ └── IQKeyboardManagerSwift.xcconfig
│ │ ├── ImagePicker
│ │ │ ├── ImagePicker-Info.plist
│ │ │ ├── ImagePicker-dummy.m
│ │ │ ├── ImagePicker-prefix.pch
│ │ │ ├── ImagePicker-umbrella.h
│ │ │ ├── ImagePicker.modulemap
│ │ │ ├── ImagePicker.xcconfig
│ │ │ └── ResourceBundle-ImagePicker-ImagePicker-Info.plist
│ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-Info.plist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-acknowledgements.markdown
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-acknowledgements.plist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-dummy.m
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Debug-input-files.xcfilelist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Debug-output-files.xcfilelist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Release-input-files.xcfilelist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Release-output-files.xcfilelist
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-frameworks.sh
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture-umbrella.h
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture.debug.xcconfig
│ │ │ ├── Pods-ZJTableViewDemo-CommentsWithPicture.modulemap
│ │ │ └── Pods-ZJTableViewDemo-CommentsWithPicture.release.xcconfig
│ │ ├── Pods-ZJTableViewDemo-Demo2
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-Info.plist
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-acknowledgements.markdown
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-acknowledgements.plist
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-dummy.m
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-frameworks.sh
│ │ │ ├── Pods-ZJTableViewDemo-Demo2-umbrella.h
│ │ │ ├── Pods-ZJTableViewDemo-Demo2.debug.xcconfig
│ │ │ ├── Pods-ZJTableViewDemo-Demo2.modulemap
│ │ │ └── Pods-ZJTableViewDemo-Demo2.release.xcconfig
│ │ ├── SKPhotoBrowser
│ │ │ ├── SKPhotoBrowser-Info.plist
│ │ │ ├── SKPhotoBrowser-dummy.m
│ │ │ ├── SKPhotoBrowser-prefix.pch
│ │ │ ├── SKPhotoBrowser-umbrella.h
│ │ │ ├── SKPhotoBrowser.modulemap
│ │ │ └── SKPhotoBrowser.xcconfig
│ │ ├── SwiftyStarRatingView
│ │ │ ├── SwiftyStarRatingView-Info.plist
│ │ │ ├── SwiftyStarRatingView-dummy.m
│ │ │ ├── SwiftyStarRatingView-prefix.pch
│ │ │ ├── SwiftyStarRatingView-umbrella.h
│ │ │ ├── SwiftyStarRatingView.modulemap
│ │ │ └── SwiftyStarRatingView.xcconfig
│ │ └── ZJTableViewManager
│ │ │ ├── ZJTableViewManager-Info.plist
│ │ │ ├── ZJTableViewManager-dummy.m
│ │ │ ├── ZJTableViewManager-prefix.pch
│ │ │ ├── ZJTableViewManager-umbrella.h
│ │ │ ├── ZJTableViewManager.modulemap
│ │ │ └── ZJTableViewManager.xcconfig
│ └── ZJTableViewManager
│ │ ├── FILE_LICENSE
│ │ ├── README.md
│ │ └── ZJTableViewManager
│ │ ├── Core
│ │ ├── ZJProtocol.swift
│ │ ├── ZJTableViewCell.swift
│ │ ├── ZJTableViewItem.swift
│ │ ├── ZJTableViewManager.swift
│ │ └── ZJTableViewSection.swift
│ │ └── Other
│ │ └── ZJExpandTreeCellItem.swift
├── ShoppingCartDemo
│ ├── Demo2.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Demo2
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Category1Cell.swift
│ │ ├── Category1Cell.xib
│ │ ├── Category2Cell.swift
│ │ ├── Category2Cell.xib
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── ZJTableViewDemo.xcworkspace
│ └── contents.xcworkspacedata
├── README.md
├── README_EN.md
├── ScreenShot
├── auto_height.jpg
├── forms_shot.jpg
├── pictrue_item_read.gif
└── pictureitem_edit.gif
├── ZJTableViewManager.podspec
└── ZJTableViewManager
├── Core
├── ZJDefaultCell.swift
├── ZJProtocol.swift
├── ZJTableViewItem.swift
├── ZJTableViewManager.swift
└── ZJTableViewSection.swift
└── Other
└── ZJExpandTreeCellItem.swift
/.swift-version:
--------------------------------------------------------------------------------
1 | 4.0
2 |
--------------------------------------------------------------------------------
/Demo/NormalExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Demo/NormalExample.xcworkspace/xcuserdata/jay.xcuserdatad/IDEFindNavigatorScopes.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/AutomaticHeight/AutomaticHeightCell/AutomaticHeightCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AutomaticHeightCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/10/16.
6 | // Copyright © 2018 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AutomaticHeightCellItem: ZJTableViewItem {
12 | var feed: Feed!
13 | }
14 |
15 | /// 支持系统autolayout搭建的cell(xib以及snapkit等基于autolayout的约束框架都是支持的)
16 | class AutomaticHeightCell: UITableViewCell, ZJCellProtocol {
17 | var item: AutomaticHeightCellItem!
18 |
19 | typealias ZJCellItemClass = AutomaticHeightCellItem
20 | @IBOutlet var titleLabel: UILabel!
21 | @IBOutlet var contentLabel: UILabel!
22 | @IBOutlet var contentImageView: UIImageView!
23 | @IBOutlet var usernameLabel: UILabel!
24 | @IBOutlet var timeLabel: UILabel!
25 |
26 | override func awakeFromNib() {
27 | super.awakeFromNib()
28 | // Initialization code
29 | }
30 |
31 | /// cell即将出现在屏幕中的回调方法 在这个方法里面赋值
32 | func cellPrepared() {
33 | titleLabel.text = item.feed.title
34 | contentLabel.text = item.feed.content
35 | contentImageView.image = UIImage(named: item.feed.imageName)
36 | usernameLabel.text = item.feed.username
37 | timeLabel.text = item.feed.time
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/AutomaticHeight/AutomaticHeightViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AutomaticHeightViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/10/16.
6 | // Copyright © 2018 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AutomaticHeightViewController: UIViewController {
12 | var tableView: UITableView!
13 | var manager: ZJTableViewManager!
14 | var section = ZJTableViewSection()
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | title = "AutomaticHeight"
19 | tableView = UITableView(frame: view.bounds, style: .plain)
20 | view.addSubview(tableView)
21 | manager = ZJTableViewManager(tableView: tableView)
22 | manager.register(AutomaticHeightCell.self, AutomaticHeightCellItem.self)
23 | manager.add(section: section)
24 |
25 | // 模拟网络请求
26 | httpRequest(view: view) {
27 | // 网络请求完成
28 | self.showData()
29 | }
30 | }
31 |
32 | func showData() {
33 | // 获取假数据
34 | let array = getFeedData()
35 | for feed in array {
36 | let item = AutomaticHeightCellItem()
37 | item.feed = feed
38 | // 计算高度
39 | item.autoHeight(manager)
40 | // 把cell加入进section
41 | section.add(item: item)
42 | }
43 | manager.reload()
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Basic/BasicViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FormViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class BasicViewController: UIViewController {
12 | var tableView: UITableView!
13 | var manager: ZJTableViewManager!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | title = "Basic"
18 |
19 | tableView = UITableView(frame: view.bounds, style: .plain)
20 | view.addSubview(tableView)
21 | manager = ZJTableViewManager(tableView: tableView)
22 |
23 | manager.register(ZJTextCell.self, ZJTextItem.self)
24 | manager.register(ZJTextFieldCell.self, ZJTextFieldItem.self)
25 | manager.register(ZJSwitchCell.self, ZJSwitchItem.self)
26 |
27 | // Custom SectionHeader
28 | let headerView = CustomSectionHeaderView.view()
29 | let section = ZJTableViewSection(headerView: headerView)
30 | manager.add(section: section)
31 |
32 | // Custom Cell
33 | // Simple String
34 | section.add(item: ZJTableViewItem(text: "Simple String"))
35 |
36 | // Full length text field
37 | section.add(item: ZJTextFieldItem(title: nil, placeHolder: "Full length text field", text: nil, isFullLength: true, didChanged: nil))
38 |
39 | // Text Item
40 | section.add(item: ZJTextFieldItem(title: "Text Item", placeHolder: "Text", text: nil, didChanged: { item in
41 | if let text = (item as! ZJTextFieldItem).text {
42 | zj_log(text)
43 | }
44 | }))
45 |
46 | // Password
47 | let passwordItem = ZJTextFieldItem(title: "Password", placeHolder: "Password Item", text: nil, didChanged: { item in
48 | if let text = (item as! ZJTextFieldItem).text {
49 | zj_log(text)
50 | }
51 | })
52 | passwordItem.isSecureTextEntry = true
53 | section.add(item: passwordItem)
54 |
55 | // Switch Item
56 | section.add(item: ZJSwitchItem(title: "Switch Item", isOn: false, didChanged: { item in
57 | zj_log(item.isOn)
58 | }))
59 |
60 | manager.reload()
61 | // Do any additional setup after loading the view.
62 | }
63 |
64 | override func didReceiveMemoryWarning() {
65 | super.didReceiveMemoryWarning()
66 | // Dispose of any resources that can be recreated.
67 | }
68 |
69 | /*
70 | // MARK: - Navigation
71 |
72 | // In a storyboard-based application, you will often want to do a little preparation before navigation
73 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
74 | // Get the new view controller using segue.destinationViewController.
75 | // Pass the selected object to the new view controller.
76 | }
77 | */
78 | }
79 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Basic/Cells/ZJSwitchCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJSwitchCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/7.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ZJSwitchItem: ZJTableViewItem {
12 | var title: String?
13 | var isOn: Bool = false
14 | var didChanged: ((ZJSwitchItem) -> Void)?
15 | convenience init(title: String?, isOn: Bool, didChanged: ((ZJSwitchItem) -> Void)?) {
16 | self.init()
17 | self.title = title
18 | self.isOn = isOn
19 | self.didChanged = didChanged
20 | }
21 | }
22 |
23 | class ZJSwitchCell: UITableViewCell, ZJCellProtocol {
24 | var item: ZJSwitchItem!
25 |
26 | typealias ZJCellItemClass = ZJSwitchItem
27 |
28 | @IBOutlet var labelTitle: UILabel!
29 | @IBOutlet var switchButton: UISwitch!
30 |
31 | override func awakeFromNib() {
32 | super.awakeFromNib()
33 | // Initialization code
34 | }
35 |
36 | func cellPrepared() {
37 | labelTitle.text = item.title
38 | switchButton.isOn = item.isOn
39 | }
40 |
41 | @IBAction func valueChanged(_ sender: UISwitch) {
42 | item.isOn = sender.isOn
43 | item.didChanged?(item)
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Basic/Cells/ZJTextCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTextCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJTextItem: ZJTableViewItem {
12 | public var text: String?
13 | public var placeHolder: String?
14 | public var textViewBackgroundColor: UIColor = UIColor.white
15 | public var didChanged: ZJTableViewItemBlock?
16 | override init() {
17 | super.init()
18 | cellHeight = 125
19 | selectionStyle = UITableViewCell.SelectionStyle.none
20 | }
21 |
22 | public convenience init(text: String?, placeHolder: String, didChanged: ZJTableViewItemBlock?) {
23 | self.init()
24 | self.text = text
25 | self.placeHolder = placeHolder
26 | self.didChanged = didChanged
27 | }
28 | }
29 |
30 | open class ZJTextCell: UITableViewCell, UITextViewDelegate, ZJCellProtocol {
31 | public var item: ZJTextItem!
32 |
33 | public typealias ZJCellItemClass = ZJTextItem
34 |
35 | @IBOutlet var textView: ZJTextView!
36 |
37 | override open func awakeFromNib() {
38 | super.awakeFromNib()
39 | // Initialization code
40 | textView.delegate = self
41 | }
42 |
43 | public func cellPrepared() {
44 | textView.placeholder = item.placeHolder
45 | textView.text = item.text
46 | textView.backgroundColor = item.textViewBackgroundColor
47 | }
48 |
49 | public func textViewDidChange(_ textView: UITextView) {
50 | item.text = textView.text
51 | item.didChanged?(item)
52 | }
53 |
54 | override open func setSelected(_ selected: Bool, animated: Bool) {
55 | super.setSelected(selected, animated: animated)
56 |
57 | // Configure the view for the selected state
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Basic/Cells/ZJTextFieldCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTextFieldCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/7.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJTextFieldItem: ZJTableViewItem {
12 | public var title: String?
13 | public var placeHolder: String?
14 | public var text: String?
15 | public var didChanged: ZJTableViewItemBlock?
16 | public var isFullLength: Bool = false
17 | public var isSecureTextEntry: Bool = false
18 |
19 | public convenience init(title: String?, placeHolder: String?, text: String?, isFullLength: Bool = false, didChanged: ZJTableViewItemBlock?) {
20 | self.init()
21 | self.title = title
22 | self.placeHolder = placeHolder
23 | self.text = text
24 | self.isFullLength = isFullLength
25 | self.didChanged = didChanged
26 | }
27 | }
28 |
29 | open class ZJTextFieldCell: UITableViewCell, ZJCellProtocol {
30 | public var item: ZJTextFieldItem!
31 |
32 | public typealias ZJCellItemClass = ZJTextFieldItem
33 |
34 | @IBOutlet var titleConstraint: NSLayoutConstraint!
35 | @IBOutlet var labelTitle: UILabel!
36 |
37 | @IBOutlet var textField: UITextField!
38 | override open func awakeFromNib() {
39 | super.awakeFromNib()
40 |
41 | textField.addTarget(self, action: #selector(textFieldDidChanged(textField:)), for: UIControl.Event.editingChanged)
42 | // Initialization code
43 | }
44 |
45 | public func cellPrepared() {
46 | if item.isFullLength {
47 | titleConstraint.constant = 0
48 | } else {
49 | labelTitle.text = item.title
50 | }
51 | textField.isSecureTextEntry = item.isSecureTextEntry
52 | textField.text = item.text
53 | textField.placeholder = item.placeHolder
54 | }
55 |
56 | @objc func textFieldDidChanged(textField: UITextField) {
57 | item.text = textField.text
58 | item.didChanged?(item)
59 | }
60 |
61 | override open func setSelected(_ selected: Bool, animated: Bool) {
62 | super.setSelected(selected, animated: animated)
63 |
64 | // Configure the view for the selected state
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Basic/CustomHeader/CustomSectionHeaderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomSectionHeaderView.swift
3 | // NormalExample
4 | //
5 | // Created by Jie Zhang on 2020/4/15.
6 | // Copyright © 2020 Green Dot. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomSectionHeaderView: UIView {
12 | class func view() -> CustomSectionHeaderView {
13 | let nib = UINib(nibName: "CustomSectionHeaderView", bundle: nil)
14 | let headerView = nib.instantiate(withOwner: nil, options: nil)[0] as! CustomSectionHeaderView
15 | headerView.frame.size.height = 44
16 | return headerView
17 | }
18 |
19 | /*
20 | // Only override draw() if you perform custom drawing.
21 | // An empty implementation adversely affects performance during animation.
22 | override func draw(_ rect: CGRect) {
23 | // Drawing code
24 | }
25 | */
26 | }
27 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/EditingViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EditingViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/10.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class EditingViewController: UIViewController {
12 | var tableView: UITableView!
13 | var manager: ZJTableViewManager!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | title = "SlideDelete"
18 |
19 | tableView = UITableView(frame: view.bounds, style: .grouped)
20 | view.addSubview(tableView)
21 | manager = ZJTableViewManager(tableView: tableView)
22 |
23 | var section = ZJTableViewSection(headerTitle: "DELETEABLE")
24 | manager.add(section: section)
25 | for i in 0 ... 3 {
26 | let item = ZJTableViewItem(text: "section 0, row " + String(i))
27 | item.editingStyle = .delete
28 | item.setDeletionHandler { [weak self] item in
29 | self?.deleteConfirm(item: item, needConfirm: false)
30 | }
31 | section.add(item: item)
32 | }
33 |
34 | section = ZJTableViewSection(headerTitle: "Deletable with confirmation")
35 | manager.add(section: section)
36 | for i in 0 ... 3 {
37 | let item = ZJTableViewItem(text: "section 1, row " + String(i))
38 | item.editingStyle = .delete
39 | item.setDeletionHandler { [weak self] item in
40 | self?.deleteConfirm(item: item)
41 | }
42 | section.add(item: item)
43 | }
44 |
45 | manager.reload()
46 | // Do any additional setup after loading the view.
47 | }
48 |
49 | func deleteConfirm(item: ZJTableViewItem, needConfirm: Bool = true) {
50 | if !needConfirm {
51 | zj_log((item.labelText ?? "") + " deleted!")
52 | item.delete()
53 | return
54 | }
55 |
56 | let alertVC = UIAlertController(title: "Confirmation", message: "Are you sure to delete " + (item.labelText)!, preferredStyle: .alert)
57 | alertVC.addAction(UIAlertAction(title: "Delete", style: .default, handler: { _ in
58 | zj_log((item.labelText ?? "") + " deleted!")
59 | item.delete(.fade)
60 | }))
61 | alertVC.addAction(UIAlertAction(title: "Cancel", style: .default, handler: nil))
62 | present(alertVC, animated: true, completion: nil)
63 | }
64 |
65 | override func didReceiveMemoryWarning() {
66 | super.didReceiveMemoryWarning()
67 | // Dispose of any resources that can be recreated.
68 | }
69 |
70 | /*
71 | // MARK: - Navigation
72 |
73 | // In a storyboard-based application, you will often want to do a little preparation before navigation
74 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
75 | // Get the new view controller using segue.destinationViewController.
76 | // Pass the selected object to the new view controller.
77 | }
78 | */
79 | }
80 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ExpandTree/Cells/CustomExpandButtonCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomExpandButtonCell.swift
3 | // NormalExample
4 | //
5 | // Created by Jie Zhang on 2020/4/15.
6 | // Copyright © 2020 Green Dot. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CustomExpandButtonCellItem: ZJExpandTreeCellItem {
12 | var title: String?
13 | var buttonTapCallBack: ((CustomExpandButtonCellItem) -> Void)?
14 |
15 | override init() {
16 | super.init()
17 | // 取消默认的点击展开处理
18 | selectionHandler = nil
19 | buttonTapCallBack = { callBackItem in
20 | callBackItem.toggleExpand()
21 | }
22 | }
23 |
24 | // 重写方法,目的是在展开事件结束后修改cell上面的按钮的标题
25 | @discardableResult override func toggleExpand() -> Bool {
26 | let bool = super.toggleExpand()
27 | if let cell = cell as? CustomExpandButtonCell {
28 | // 理论上是要尽量避免直接修改cell上面的控件的值,我这里修改了btnExpand.isSelected属性,同时在cellPrepared()里面设置btnExpand.isSelected = item.isExpand,确保是一致的。这样不会有复用的问题。
29 | cell.btnExpand.isSelected = bool
30 | }
31 | return bool
32 | }
33 | }
34 |
35 | class CustomExpandButtonCell: UITableViewCell, ZJCellProtocol {
36 | var item: CustomExpandButtonCellItem!
37 | typealias ZJCellItemClass = CustomExpandButtonCellItem
38 | @IBOutlet var btnExpand: UIButton!
39 | @IBOutlet var labelTitle: UILabel!
40 | func cellPrepared() {
41 | btnExpand.isSelected = item.isExpand
42 | labelTitle.text = item.title
43 | }
44 |
45 | @IBAction func actionExpand(_: Any) {
46 | item.buttonTapCallBack?(item)
47 | }
48 |
49 | override func awakeFromNib() {
50 | super.awakeFromNib()
51 | // Initialization code
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ExpandTree/Cells/Level0Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Level0Cell.swift
3 | // ZJExpandTreeDeme
4 | //
5 | // Created by Javen on 2019/3/20.
6 | // Copyright © 2019 Javen. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class Level0CellItem: ZJExpandTreeCellItem {
12 | var title: String?
13 | }
14 |
15 | class Level0Cell: UITableViewCell, ZJCellProtocol {
16 | @IBOutlet var labelTitle: UILabel!
17 | var item: Level0CellItem!
18 |
19 | typealias ZJCellItemClass = Level0CellItem
20 |
21 | func cellPrepared() {
22 | labelTitle.text = item.title
23 | }
24 |
25 | func cellDidAppear() {}
26 |
27 | func cellDidDisappear() {}
28 |
29 | override func awakeFromNib() {
30 | super.awakeFromNib()
31 | // Initialization code
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ExpandTree/Cells/Level1Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Level1Cell.swift
3 | // ZJExpandTreeDeme
4 | //
5 | // Created by Javen on 2019/3/20.
6 | // Copyright © 2019 Javen. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class Level1CellItem: ZJExpandTreeCellItem {}
12 |
13 | class Level1Cell: UITableViewCell, ZJCellProtocol {
14 | var item: Level1CellItem!
15 |
16 | typealias ZJCellItemClass = Level1CellItem
17 |
18 | func cellPrepared() {}
19 |
20 | override func awakeFromNib() {
21 | super.awakeFromNib()
22 | self.backgroundColor = .clear
23 | // Initialization code
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ExpandTree/Cells/Level2Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Level2Cell.swift
3 | // ZJExpandTreeDeme
4 | //
5 | // Created by Javen on 2019/3/20.
6 | // Copyright © 2019 Javen. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class Level2CellItem: ZJExpandTreeCellItem {}
12 |
13 | class Level2Cell: UITableViewCell, ZJCellProtocol {
14 | var item: Level2CellItem!
15 |
16 | typealias ZJCellItemClass = Level2CellItem
17 |
18 | func cellPrepared() {}
19 |
20 | override func awakeFromNib() {
21 | super.awakeFromNib()
22 | // Initialization code
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ExpandTree/Cells/Level3Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Level3Cell.swift
3 | // ZJExpandTreeDeme
4 | //
5 | // Created by Javen on 2019/3/20.
6 | // Copyright © 2019 Javen. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class Level3CellItem: ZJExpandTreeCellItem {}
12 |
13 | class Level3Cell: UITableViewCell, ZJCellProtocol {
14 | var item: Level3CellItem!
15 |
16 | typealias ZJCellItemClass = Level3CellItem
17 |
18 | func cellPrepared() {}
19 |
20 | override func awakeFromNib() {
21 | super.awakeFromNib()
22 | // Initialization code
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | var window: UIWindow?
14 |
15 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16 | // Override point for customization after application launch.
17 | return true
18 | }
19 |
20 | func applicationWillResignActive(_: UIApplication) {
21 | // 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.
22 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
23 | }
24 |
25 | func applicationDidEnterBackground(_: UIApplication) {
26 | // 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.
27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
28 | }
29 |
30 | func applicationWillEnterForeground(_: UIApplication) {
31 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
32 | }
33 |
34 | func applicationDidBecomeActive(_: UIApplication) {
35 | // 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.
36 | }
37 |
38 | func applicationWillTerminate(_: UIApplication) {
39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/1.imageset/1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/1.imageset/1.jpeg
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "1.jpeg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/2.imageset/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/2.imageset/2.jpg
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "2.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/3.imageset/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/3.imageset/3.jpg
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "3.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/4.imageset/4.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/4.imageset/4.jpeg
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "4.jpeg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/card.imageset/068588f6-7747-455a-8ee3-6519f4890a9c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/card.imageset/068588f6-7747-455a-8ee3-6519f4890a9c.png
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/card.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "068588f6-7747-455a-8ee3-6519f4890a9c.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/checkmark.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "checkmark.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/checkmark.imageset/checkmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Demo/NormalExample/NormalExample/Resource/Assets.xcassets/checkmark.imageset/checkmark.png
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/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 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/FPS/YYFPSLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYFPSLabel.h
3 | // YYKitExample
4 | //
5 | // Created by ibireme on 15/9/3.
6 | // Copyright (c) 2015 ibireme. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | Show Screen FPS...
13 |
14 | The maximum fps in OSX/iOS Simulator is 60.00.
15 | The maximum fps on iPhone is 59.97.
16 | The maxmium fps on iPad is 60.0.
17 | */
18 | @interface YYFPSLabel : UILabel
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/FPS/YYFPSLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYFPSLabel.m
3 | // YYKitExample
4 | //
5 | // Created by ibireme on 15/9/3.
6 | // Copyright (c) 2015 ibireme. All rights reserved.
7 | //
8 |
9 | #import "YYFPSLabel.h"
10 | #import "YYWeakProxy.h"
11 |
12 | #define kSize CGSizeMake(55, 20)
13 |
14 | @implementation YYFPSLabel {
15 | CADisplayLink *_link;
16 | NSUInteger _count;
17 | NSTimeInterval _lastTime;
18 | UIFont *_font;
19 | UIFont *_subFont;
20 |
21 | NSTimeInterval _llll;
22 | }
23 |
24 | - (instancetype)initWithFrame:(CGRect)frame {
25 | if (frame.size.width == 0 && frame.size.height == 0) {
26 | frame.size = kSize;
27 | }
28 | self = [super initWithFrame:frame];
29 |
30 | self.layer.cornerRadius = 5;
31 | self.clipsToBounds = YES;
32 | self.textAlignment = NSTextAlignmentCenter;
33 | self.userInteractionEnabled = NO;
34 | self.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.700];
35 |
36 | _font = [UIFont fontWithName:@"Menlo" size:14];
37 | if (_font) {
38 | _subFont = [UIFont fontWithName:@"Menlo" size:4];
39 | } else {
40 | _font = [UIFont fontWithName:@"Courier" size:14];
41 | _subFont = [UIFont fontWithName:@"Courier" size:4];
42 | }
43 |
44 | _link = [CADisplayLink displayLinkWithTarget:[YYWeakProxy proxyWithTarget:self] selector:@selector(tick:)];
45 | [_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
46 | return self;
47 | }
48 |
49 | - (void)dealloc {
50 | [_link invalidate];
51 | }
52 |
53 | - (CGSize)sizeThatFits:(CGSize)size {
54 | return kSize;
55 | }
56 |
57 | - (void)tick:(CADisplayLink *)link {
58 | if (_lastTime == 0) {
59 | _lastTime = link.timestamp;
60 | return;
61 | }
62 |
63 | _count++;
64 | NSTimeInterval delta = link.timestamp - _lastTime;
65 | if (delta < 1) return;
66 | _lastTime = link.timestamp;
67 | float fps = _count / delta;
68 | _count = 0;
69 |
70 | CGFloat progress = fps / 60.0;
71 | UIColor *color = [UIColor colorWithHue:0.27 * (progress - 0.2) saturation:1 brightness:0.9 alpha:1];
72 |
73 | NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d FPS",(int)round(fps)]];
74 | [text addAttributes:@{NSForegroundColorAttributeName: color} range:NSMakeRange(0, text.length - 3)];
75 | [text addAttributes:@{NSForegroundColorAttributeName: UIColor.whiteColor} range:NSMakeRange(text.length - 3, 3)];
76 | [text addAttributes:@{NSFontAttributeName: _subFont} range:NSMakeRange(text.length - 4, 1)];
77 |
78 | self.attributedText = text;
79 | }
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/FPS/YYWeakProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | /**
15 | A proxy used to hold a weak object.
16 | It can be used to avoid retain cycles, such as the target in NSTimer or CADisplayLink.
17 |
18 | sample code:
19 |
20 | @implementation MyView {
21 | NSTimer *_timer;
22 | }
23 |
24 | - (void)initTimer {
25 | YYWeakProxy *proxy = [YYWeakProxy proxyWithTarget:self];
26 | _timer = [NSTimer timerWithTimeInterval:0.1 target:proxy selector:@selector(tick:) userInfo:nil repeats:YES];
27 | }
28 |
29 | - (void)tick:(NSTimer *)timer {...}
30 | @end
31 | */
32 | @interface YYWeakProxy : NSProxy
33 |
34 | /**
35 | The proxy target.
36 | */
37 | @property (nonatomic, weak, readonly) id target;
38 |
39 | /**
40 | Creates a new weak proxy for target.
41 |
42 | @param target Target object.
43 |
44 | @return A new proxy object.
45 | */
46 | - (instancetype)initWithTarget:(id)target;
47 |
48 | /**
49 | Creates a new weak proxy for target.
50 |
51 | @param target Target object.
52 |
53 | @return A new proxy object.
54 | */
55 | + (instancetype)proxyWithTarget:(id)target;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/FPS/YYWeakProxy.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYWeakProxy.h"
13 |
14 |
15 | @implementation YYWeakProxy
16 |
17 | - (instancetype)initWithTarget:(id)target {
18 | _target = target;
19 | return self;
20 | }
21 |
22 | + (instancetype)proxyWithTarget:(id)target {
23 | return [[YYWeakProxy alloc] initWithTarget:target];
24 | }
25 |
26 | - (id)forwardingTargetForSelector:(SEL)selector {
27 | return _target;
28 | }
29 |
30 | - (void)forwardInvocation:(NSInvocation *)invocation {
31 | void *null = NULL;
32 | [invocation setReturnValue:&null];
33 | }
34 |
35 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
36 | return [NSObject instanceMethodSignatureForSelector:@selector(init)];
37 | }
38 |
39 | - (BOOL)respondsToSelector:(SEL)aSelector {
40 | return [_target respondsToSelector:aSelector];
41 | }
42 |
43 | - (BOOL)isEqual:(id)object {
44 | return [_target isEqual:object];
45 | }
46 |
47 | - (NSUInteger)hash {
48 | return [_target hash];
49 | }
50 |
51 | - (Class)superclass {
52 | return [_target superclass];
53 | }
54 |
55 | - (Class)class {
56 | return [_target class];
57 | }
58 |
59 | - (BOOL)isKindOfClass:(Class)aClass {
60 | return [_target isKindOfClass:aClass];
61 | }
62 |
63 | - (BOOL)isMemberOfClass:(Class)aClass {
64 | return [_target isMemberOfClass:aClass];
65 | }
66 |
67 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol {
68 | return [_target conformsToProtocol:aProtocol];
69 | }
70 |
71 | - (BOOL)isProxy {
72 | return YES;
73 | }
74 |
75 | - (NSString *)description {
76 | return [_target description];
77 | }
78 |
79 | - (NSString *)debugDescription {
80 | return [_target debugDescription];
81 | }
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/Info-manager.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UIStatusBarHidden
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/NormalExample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import "YYFPSLabel.h"
6 |
7 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/ZJBaseTableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJBaseTableViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJBaseTableViewController: UIViewController {
12 | @IBOutlet var IBTableView: UITableView?
13 | public var tableView: UITableView!
14 | public var manager: ZJTableViewManager!
15 | public var tableViewStyle: UITableView.Style = UITableView.Style.plain
16 |
17 | override open func viewDidLoad() {
18 | super.viewDidLoad()
19 | if let tableView = IBTableView {
20 | self.tableView = tableView
21 | } else {
22 | tableView = UITableView(frame: view.bounds, style: tableViewStyle)
23 | view.addSubview(tableView)
24 | }
25 | manager = ZJTableViewManager(tableView: tableView)
26 |
27 | // Do any additional setup after loading the view.
28 | }
29 |
30 | override open func viewDidLayoutSubviews() {
31 | super.viewDidLayoutSubviews()
32 | if IBTableView == nil {
33 | tableView.frame = view.bounds
34 | }
35 | }
36 |
37 | override open func didReceiveMemoryWarning() {
38 | super.didReceiveMemoryWarning()
39 | // Dispose of any resources that can be recreated.
40 | }
41 |
42 | /*
43 | // MARK: - Navigation
44 |
45 | // In a storyboard-based application, you will often want to do a little preparation before navigation
46 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
47 | // Get the new view controller using segue.destinationViewController.
48 | // Pass the selected object to the new view controller.
49 | }
50 | */
51 | }
52 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Resource/test.m:
--------------------------------------------------------------------------------
1 | //
2 | // test.m
3 | // NormalExample
4 | //
5 | // Created by Javen on 2020/4/16.
6 | // Copyright © 2020 Green Dot. All rights reserved.
7 | //
8 |
9 | #import
10 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/RetractableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RetractableViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RetractableViewController: ZJBaseTableViewController {
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | title = "Retractable"
15 | tableView.tableFooterView = UIView()
16 |
17 | // Add main section
18 | let section = ZJTableViewSection()
19 | manager.add(section: section)
20 |
21 | var collapsedItems: [ZJTableViewItem] = []
22 | var expandedItems: [ZJTableViewItem] = []
23 |
24 | // collapsed
25 | for i in 1 ... 4 {
26 | collapsedItems.append(ZJTableViewItem(text: "Test Item " + String(i)))
27 | }
28 |
29 | let moreItem = ZJTableViewItem(text: "Show More")
30 | moreItem.accessoryType = .disclosureIndicator
31 | collapsedItems.append(moreItem)
32 | moreItem.setSelectionHandler { _ in
33 | section.replaceItemsFrom(array: expandedItems)
34 | section.reload(UITableView.RowAnimation.automatic)
35 | }
36 | section.replaceItemsFrom(array: collapsedItems)
37 |
38 | // expanded
39 | for i in 1 ... 7 {
40 | expandedItems.append(ZJTableViewItem(text: "Test Item " + String(i)))
41 | }
42 |
43 | let lessItem = ZJTableViewItem(text: "Show Less")
44 | lessItem.accessoryType = .disclosureIndicator
45 |
46 | lessItem.setSelectionHandler { _ in
47 | section.replaceItemsFrom(array: collapsedItems)
48 | section.reload(UITableView.RowAnimation.automatic)
49 | }
50 | expandedItems.append(lessItem)
51 |
52 | manager.reload()
53 |
54 | // Do any additional setup after loading the view.
55 | }
56 |
57 | override func didReceiveMemoryWarning() {
58 | super.didReceiveMemoryWarning()
59 | // Dispose of any resources that can be recreated.
60 | }
61 |
62 | /*
63 | // MARK: - Navigation
64 |
65 | // In a storyboard-based application, you will often want to do a little preparation before navigation
66 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
67 | // Get the new view controller using segue.destinationViewController.
68 | // Pass the selected object to the new view controller.
69 | }
70 | */
71 | }
72 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/SectionsViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SectionsViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/13.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SectionsViewController: UIViewController {
12 | var tableView: UITableView!
13 | var manager: ZJTableViewManager!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | title = "Sections"
18 |
19 | tableView = UITableView(frame: view.bounds, style: .grouped)
20 | view.addSubview(tableView)
21 | manager = ZJTableViewManager(tableView: tableView)
22 |
23 | for i in 0 ... 8 {
24 | let section = ZJTableViewSection(headerTitle: "Section " + String(i))
25 | manager.add(section: section)
26 | section.setHeaderWillDisplayHandler { currentSection in
27 | zj_log("Section" + String(currentSection.index) + " will display!")
28 | }
29 |
30 | section.setHeaderDidEndDisplayHandler { _ in
31 | // zj_log("Section" + String(currentSection.index) + " did end display!")
32 | }
33 |
34 | for j in 0 ... 4 {
35 | section.add(item: ZJTableViewItem(text: "Section " + String(i) + " Row " + String(j)))
36 | }
37 | }
38 |
39 | manager.reload()
40 | // Do any additional setup after loading the view.
41 | }
42 |
43 | override func didReceiveMemoryWarning() {
44 | super.didReceiveMemoryWarning()
45 | // Dispose of any resources that can be recreated.
46 | }
47 |
48 | /*
49 | // MARK: - Navigation
50 |
51 | // In a storyboard-based application, you will often want to do a little preparation before navigation
52 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
53 | // Get the new view controller using segue.destinationViewController.
54 | // Pass the selected object to the new view controller.
55 | }
56 | */
57 | }
58 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/Selection/SelectionCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SelectionCell.swift
3 | // NormalExample
4 | //
5 | // Created by Jie Zhang on 2020/5/20.
6 | // Copyright © 2020 Green Dot. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SelectionCellItem: ZJTableViewItem {
12 | override init() {
13 | super.init()
14 | selectionStyle = .none
15 | }
16 | }
17 |
18 | class SelectionCell: UITableViewCell, ZJCellProtocol {
19 | typealias ZJCellItemClass = SelectionCellItem
20 | var item: SelectionCellItem!
21 | @IBOutlet var img: UIImageView!
22 | @IBOutlet var titleL: UILabel!
23 |
24 | func cellPrepared() {
25 | titleL.text = "Item \(item.indexPath.row)"
26 | }
27 |
28 | override func setSelected(_ selected: Bool, animated: Bool) {
29 | super.setSelected(selected, animated: animated)
30 | if selected {
31 | img.isHidden = false
32 | } else {
33 | img.isHidden = true
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/UpdateHeight/CardTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CardTableViewCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Jie Zhang on 2019/8/15.
6 | // Copyright © 2019 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 | let openHeight: CGFloat = (UIScreen.main.bounds.size.width - 30) * (593 / 939) + 25
11 | let closeHeight: CGFloat = 54
12 | class CardTableViewCellItem: ZJTableViewItem {
13 | var isOpen = false
14 | var zPosition: CGFloat = 0
15 | override init() {
16 | super.init()
17 | cellHeight = closeHeight
18 | selectionStyle = .none
19 | }
20 |
21 | func openCard() {
22 | isOpen = true
23 | cellHeight = openHeight
24 | }
25 |
26 | func closeCard() {
27 | isOpen = false
28 | cellHeight = closeHeight
29 | }
30 | }
31 |
32 | class CardTableViewCell: UITableViewCell, ZJCellProtocol {
33 | var item: CardTableViewCellItem!
34 |
35 | typealias ZJCellItemClass = CardTableViewCellItem
36 |
37 | @IBOutlet var cardView: UIView!
38 | @IBOutlet var cardImg: UIImageView!
39 | override func awakeFromNib() {
40 | super.awakeFromNib()
41 | // Initialization code
42 | let radius: CGFloat = 15
43 | cardView.layer.cornerRadius = radius
44 | cardView.layer.shadowColor = UIColor.black.cgColor
45 | cardView.layer.shadowOpacity = 0.5
46 | cardView.layer.shadowOffset = CGSize(width: 0.5, height: 0.5)
47 | cardView.layer.shadowRadius = radius
48 | cardImg.layer.cornerRadius = radius
49 | cardImg.clipsToBounds = true
50 | backgroundColor = .clear
51 | backgroundView = UIView()
52 | selectedBackgroundView = UIView()
53 | }
54 |
55 | func cellPrepared() {
56 | layer.zPosition = item.zPosition
57 | }
58 |
59 | func cellWillAppear() {
60 | layer.masksToBounds = false
61 | contentView.layer.masksToBounds = false
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/UpdateHeight/UpdateHeightViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UpdateHeightViewController.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Jie Zhang on 2019/8/15.
6 | // Copyright © 2019 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class UpdateHeightViewController: UIViewController {
12 | var tableView: UITableView!
13 | var manager: ZJTableViewManager!
14 | var section: ZJTableViewSection!
15 | var lastOpenItem: CardTableViewCellItem?
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | title = "UpdateHeight"
20 | tableView = UITableView(frame: view.bounds, style: .plain)
21 | tableView.separatorStyle = .none
22 | view.addSubview(tableView)
23 | manager = ZJTableViewManager(tableView: tableView)
24 | manager.register(CardTableViewCell.self, CardTableViewCellItem.self)
25 | section = ZJTableViewSection()
26 | manager.add(section: section)
27 |
28 | for index in 0 ..< 5 {
29 | let item = CardTableViewCellItem()
30 | section.add(item: item)
31 | item.zPosition = CGFloat(index)
32 | // cell tap event
33 | item.setSelectionHandler { [unowned self] (selectItem: CardTableViewCellItem) in
34 | self.cellTapEvent(item: selectItem)
35 | }
36 | }
37 |
38 | if let lastItem = section.items.last as? CardTableViewCellItem {
39 | // Last cell keep open and don't respond to the tap event
40 | lastItem.openCard()
41 | lastItem.selectionHandler = nil
42 | }
43 |
44 | manager.reload()
45 | }
46 |
47 | func cellTapEvent(item: CardTableViewCellItem) {
48 | item.isOpen = !item.isOpen
49 | if item.isOpen {
50 | item.openCard()
51 | if lastOpenItem != item { // 关闭上一次打开的cell/ close the cell that was last opened
52 | lastOpenItem?.closeCard()
53 | lastOpenItem = item
54 | }
55 | } else {
56 | item.closeCard()
57 | }
58 |
59 | manager.updateHeight()
60 | tableView.fixCellBounds()
61 | }
62 |
63 | /*
64 | // MARK: - Navigation
65 |
66 | // In a storyboard-based application, you will often want to do a little preparation before navigation
67 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
68 | // Get the new view controller using segue.destination.
69 | // Pass the selected object to the new view controller.
70 | }
71 | */
72 | }
73 |
74 | // https://stackoverflow.com/questions/62899815/shadow-cell-flickers-when-animating-the-height
75 | extension UITableView {
76 | func fixCellBounds() {
77 | DispatchQueue.main.async { [weak self] in
78 | for cell in self?.visibleCells ?? [] {
79 | cell.layer.masksToBounds = false
80 | cell.contentView.layer.masksToBounds = false
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ZJTableViewManager/ZJTableViewManager/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Demo/NormalExample/NormalExample/ZJTableViewManager/ZJTableViewManager/ZJTableViewManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTableViewManager.h
3 | // ZJTableViewManager
4 | //
5 | // Created by Javen on 2020/4/20.
6 | // Copyright © 2020 Javen. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for ZJTableViewManager.
12 | FOUNDATION_EXPORT double ZJTableViewManagerVersionNumber;
13 |
14 | //! Project version string for ZJTableViewManager.
15 | FOUNDATION_EXPORT const unsigned char ZJTableViewManagerVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/FILE_LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 Javen (https://github.com/JavenZ).
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Demos
4 | //
5 | // Created by Javen on 2018/3/8.
6 | // Copyright © 2018年 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import IQKeyboardManagerSwift
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | IQKeyboardManager.shared.enable = true;
19 | // Override point for customization after application launch.
20 | return true
21 | }
22 |
23 | func applicationWillResignActive(_ application: UIApplication) {
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 invalidate graphics rendering callbacks. Games should use this method to pause the game.
26 | }
27 |
28 | func applicationDidEnterBackground(_ application: UIApplication) {
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 | func applicationWillEnterForeground(_ application: UIApplication) {
34 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | func applicationDidBecomeActive(_ application: UIApplication) {
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 | func applicationWillTerminate(_ application: UIApplication) {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/delete.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "attachment_Delete@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "attachment_Delete@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/delete.imageset/attachment_Delete@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/delete.imageset/attachment_Delete@2x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/delete.imageset/attachment_Delete@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/delete.imageset/attachment_Delete@3x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "demo_image_1.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_1.imageset/demo_image_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_1.imageset/demo_image_1.jpg
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "demo_image_2.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_2.imageset/demo_image_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_2.imageset/demo_image_2.jpg
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "demo_image_3.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_3.imageset/demo_image_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_3.imageset/demo_image_3.jpg
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "demo_image_4.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_4.imageset/demo_image_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_4.imageset/demo_image_4.jpg
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "demo_image_5.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_5.imageset/demo_image_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/demo_image_5.imageset/demo_image_5.jpg
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/empty_star.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "empty_star@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "empty_star@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/empty_star.imageset/empty_star@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/empty_star.imageset/empty_star@2x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/empty_star.imageset/empty_star@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/empty_star.imageset/empty_star@3x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/fill_star.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "file_star@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "file_star@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/fill_star.imageset/file_star@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/fill_star.imageset/file_star@2x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/fill_star.imageset/file_star@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/fill_star.imageset/file_star@3x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/goods.imageset/780c7aa90b3b844abb3ece7ea7b7e046@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/goods.imageset/780c7aa90b3b844abb3ece7ea7b7e046@2x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/goods.imageset/780c7aa90b3b844abb3ece7ea7b7e046@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/goods.imageset/780c7aa90b3b844abb3ece7ea7b7e046@3x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/goods.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "780c7aa90b3b844abb3ece7ea7b7e046@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "780c7aa90b3b844abb3ece7ea7b7e046@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/picture_add.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "picture_add@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "picture_add@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/picture_add.imageset/picture_add@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/picture_add.imageset/picture_add@2x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/picture_add.imageset/picture_add@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/CommentsWithPicture/CommentsWithPicture/Assets.xcassets/picture_add.imageset/picture_add@3x.png
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/Cells/ZJSwitchCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJSwitchCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/7.
6 | // Copyright © 2018年 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class ZJSwitchItem: ZJTableViewItem {
12 | public var title: String?
13 | public var isOn: Bool = false
14 | public var didChanged: ZJTableViewItemBlock?
15 | public convenience init(title: String?, isOn: Bool, didChanged: ZJTableViewItemBlock?) {
16 | self.init()
17 | self.title = title
18 | self.isOn = isOn
19 | self.didChanged = didChanged
20 | }
21 | }
22 |
23 | open class ZJSwitchCell: UITableViewCell, ZJCellProtocol {
24 | public var item: ZJSwitchItem!
25 |
26 | public typealias ZJCelltemClass = ZJSwitchItem
27 |
28 | @IBOutlet var labelTitle: UILabel!
29 | @IBOutlet var switchButton: UISwitch!
30 |
31 | open override func awakeFromNib() {
32 | super.awakeFromNib()
33 | // Initialization code
34 | }
35 |
36 | public func cellWillAppear() {
37 | labelTitle.text = item.title
38 | switchButton.isOn = item.isOn
39 | }
40 |
41 | @IBAction func valueChanged(_ sender: UISwitch) {
42 | item.isOn = sender.isOn
43 | item.didChanged?(item)
44 | }
45 |
46 | open override func setSelected(_ selected: Bool, animated: Bool) {
47 | super.setSelected(selected, animated: animated)
48 |
49 | // Configure the view for the selected state
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/Cells/ZJTextCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTextCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJTextItem: ZJTableViewItem {
12 | public var text: String?
13 | public var placeHolder: String?
14 | public var textViewBackgroundColor: UIColor = UIColor.white
15 | public var didChanged: ZJTableViewItemBlock?
16 | override init() {
17 | super.init()
18 | cellHeight = 125
19 | selectionStyle = UITableViewCell.SelectionStyle.none
20 | }
21 |
22 | public convenience init(text: String?, placeHolder: String, didChanged: ZJTableViewItemBlock?) {
23 | self.init()
24 | self.text = text
25 | self.placeHolder = placeHolder
26 | self.didChanged = didChanged
27 | }
28 | }
29 |
30 | open class ZJTextCell: UITableViewCell, UITextViewDelegate, ZJCellProtocol {
31 | public var item: ZJTextItem!
32 |
33 | public typealias ZJCelltemClass = ZJTextItem
34 |
35 | @IBOutlet var textView: ZJTextView!
36 |
37 | open override func awakeFromNib() {
38 | super.awakeFromNib()
39 | // Initialization code
40 | textView.delegate = self
41 | }
42 |
43 | public func cellWillAppear() {
44 | textView.placeholder = item.placeHolder
45 | textView.text = item.text
46 | textView.backgroundColor = item.textViewBackgroundColor
47 | }
48 |
49 | public func textViewDidChange(_ textView: UITextView) {
50 | item.text = textView.text
51 | item.didChanged?(item)
52 | }
53 |
54 | open override func setSelected(_ selected: Bool, animated: Bool) {
55 | super.setSelected(selected, animated: animated)
56 |
57 | // Configure the view for the selected state
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/Cells/ZJTextFieldCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTextFieldCell.swift
3 | // ZJTableViewManagerExample
4 | //
5 | // Created by Javen on 2018/3/7.
6 | // Copyright © 2018年 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJTextFieldItem: ZJTableViewItem {
12 | public var title: String?
13 | public var placeHolder: String?
14 | public var text: String?
15 | public var didChanged: ZJTableViewItemBlock?
16 | public var isFullLength: Bool = false
17 | public var isSecureTextEntry: Bool = false
18 |
19 | public convenience init(title: String?, placeHolder: String?, text: String?, isFullLength: Bool = false, didChanged: ZJTableViewItemBlock?) {
20 | self.init()
21 | self.title = title
22 | self.placeHolder = placeHolder
23 | self.text = text
24 | self.isFullLength = isFullLength
25 | self.didChanged = didChanged
26 | }
27 | }
28 |
29 | open class ZJTextFieldCell: UITableViewCell, ZJCellProtocol {
30 | public var item: ZJTextFieldItem!
31 |
32 | public typealias ZJCelltemClass = ZJTextFieldItem
33 |
34 | @IBOutlet var titleConstraint: NSLayoutConstraint!
35 | @IBOutlet var labelTitle: UILabel!
36 |
37 | @IBOutlet var textField: UITextField!
38 | open override func awakeFromNib() {
39 | super.awakeFromNib()
40 |
41 | textField.addTarget(self, action: #selector(textFieldDidChanged(textField:)), for: UIControl.Event.editingChanged)
42 | // Initialization code
43 | }
44 |
45 | public func cellWillAppear() {
46 | if item.isFullLength {
47 | titleConstraint.constant = 0
48 | } else {
49 | labelTitle.text = item.title
50 | }
51 | textField.isSecureTextEntry = item.isSecureTextEntry
52 | textField.text = item.text
53 | textField.placeholder = item.placeHolder
54 | }
55 |
56 | @objc func textFieldDidChanged(textField: UITextField) {
57 | item.text = textField.text
58 | item.didChanged?(item)
59 | }
60 |
61 | open override func setSelected(_ selected: Bool, animated: Bool) {
62 | super.setSelected(selected, animated: animated)
63 |
64 | // Configure the view for the selected state
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/OrderEvaluateCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OrderEvaluateCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/3/1.
6 | // Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
7 | //
8 |
9 | import SwiftyStarRatingView
10 | import UIKit
11 | import ZJTableViewManager
12 |
13 | class OrderEvaluateItem: ZJTableViewItem {
14 | var title: String?
15 | var evaluate: String?
16 | var starValue: CGFloat = 1
17 | var editable: Bool?
18 |
19 | override init() {
20 | super.init()
21 | self.cellHeight = 55
22 | self.selectionStyle = UITableViewCell.SelectionStyle.none
23 | }
24 |
25 | convenience init(eTitle: String!, starValue: CGFloat = 1, editable: Bool = true) {
26 | self.init()
27 | self.title = eTitle
28 | self.starValue = starValue
29 | self.editable = editable
30 | }
31 | }
32 |
33 | class OrderEvaluateCell: UITableViewCell, ZJCellProtocol, UITextViewDelegate {
34 | var item: OrderEvaluateItem!
35 |
36 | typealias ZJCelltemClass = OrderEvaluateItem
37 |
38 | func cellWillAppear() {
39 | labelTitle.text = item.title
40 | starView.value = item.starValue
41 | starView.isEnabled = item.editable!
42 | }
43 |
44 | @IBOutlet var imgGoods: UIImageView!
45 | @IBOutlet var starView: SwiftyStarRatingView!
46 | @IBOutlet var labelTitle: UILabel!
47 |
48 | override func awakeFromNib() {
49 | super.awakeFromNib()
50 | starView.addTarget(self, action: #selector(starViewEndChange(view:)), for: .valueChanged)
51 | // Initialization code
52 | }
53 |
54 | @objc func starViewEndChange(view: SwiftyStarRatingView) {
55 | item.starValue = view.value
56 | }
57 |
58 | override func setSelected(_ selected: Bool, animated: Bool) {
59 | super.setSelected(selected, animated: animated)
60 |
61 | // Configure the view for the selected state
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/ZJPictureCollectionCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJPictureCollectionCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/3/1.
6 | // Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | typealias ZJPictureDeleteHandler = ((Int) -> Void)
12 | class ZJPictureCollectionCell: UICollectionViewCell {
13 |
14 | /// 删除图片按钮
15 | @IBOutlet weak var btnDelete: UIButton!
16 |
17 | /// 添加的图片
18 | @IBOutlet weak var img: UIImageView!
19 | weak var collectionView: UICollectionView?
20 | var item: ZJPictureTableItem?
21 |
22 | var deleteHandler: ZJPictureDeleteHandler?
23 | func setDeleteHandler(temp: @escaping ZJPictureDeleteHandler) {
24 | self.deleteHandler = temp
25 | }
26 | func config(imageModel: Any){
27 | if (imageModel as AnyObject).isKind(of: UIImage.self) {
28 | self.img.image = imageModel as? UIImage
29 | }
30 | }
31 |
32 | @IBAction func actionDelete(_ sender: Any) {
33 | if let handler = self.deleteHandler {
34 | handler((self.collectionView?.indexPath(for: self)?.item)!)
35 | }
36 | }
37 |
38 | override func awakeFromNib() {
39 | super.awakeFromNib()
40 | // Initialization code
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/Cells/ZJTextCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTextCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/3/5.
6 | // Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ZJTableViewManager
11 |
12 | open class ZJTextItem: ZJTableViewItem {
13 | public var text: String?
14 | public var placeHolder: String?
15 | public var textViewBackgroundColor: UIColor = UIColor.white
16 | public var didChanged: ZJTableViewItemBlock?
17 | override init() {
18 | super.init()
19 | cellHeight = 125
20 | selectionStyle = UITableViewCell.SelectionStyle.none
21 | }
22 |
23 | public convenience init(text: String?, placeHolder: String, didChanged: ZJTableViewItemBlock?) {
24 | self.init()
25 | self.text = text
26 | self.placeHolder = placeHolder
27 | self.didChanged = didChanged
28 | }
29 | }
30 |
31 | open class ZJTextCell: UITableViewCell, UITextViewDelegate, ZJCellProtocol {
32 | public var item: ZJTextItem!
33 |
34 | public typealias ZJCelltemClass = ZJTextItem
35 |
36 | @IBOutlet var textView: ZJTextView!
37 |
38 | open override func awakeFromNib() {
39 | super.awakeFromNib()
40 | // Initialization code
41 | textView.delegate = self
42 | }
43 |
44 | public func cellWillAppear() {
45 | textView.placeholder = item.placeHolder
46 | textView.text = item.text
47 | textView.backgroundColor = item.textViewBackgroundColor
48 | }
49 |
50 | public func textViewDidChange(_ textView: UITextView) {
51 | item.text = textView.text
52 | item.didChanged?(item)
53 | }
54 |
55 | open override func setSelected(_ selected: Bool, animated: Bool) {
56 | super.setSelected(selected, animated: animated)
57 |
58 | // Configure the view for the selected state
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/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 |
29 |
30 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Demos
4 | //
5 | // Created by Javen on 2018/3/8.
6 | // Copyright © 2018年 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ZJTableViewManager
11 |
12 | class ViewController: UIViewController {
13 | @IBOutlet weak var tableView: UITableView!
14 | var manager: ZJTableViewManager?
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | self.title = "Demo"
18 | self.manager = ZJTableViewManager(tableView: self.tableView)
19 | tableView.separatorStyle = .none
20 | //register cell
21 | self.manager?.register(OrderEvaluateCell.self, OrderEvaluateItem.self)
22 | self.manager?.register(ZJPictureTableCell.self, ZJPictureTableItem.self)
23 |
24 | //add section
25 | let section = ZJTableViewSection(headerHeight: 10, color: UIColor.init(white: 0.9, alpha: 1))
26 | self.manager?.add(section: section)
27 |
28 | //add cells
29 | for i in 0...10 {
30 | //评价cell
31 | section.add(item: OrderEvaluateItem(eTitle: "评价"))
32 | let textItem = ZJTextItem(text: nil, placeHolder: "请在此输入您的评价~", didChanged: nil)
33 | section.add(item: textItem)
34 |
35 | //图片cell
36 | if i%2 == 1 {
37 | //只展示图片
38 | let pictureItem = ZJPictureTableItem(maxNumber: 9, column: 3, space: 1, width: self.view.frame.size.width, superVC: self, pictures: [#imageLiteral(resourceName: "demo_image_1"),#imageLiteral(resourceName: "demo_image_2"),#imageLiteral(resourceName: "demo_image_3"),#imageLiteral(resourceName: "demo_image_4"),#imageLiteral(resourceName: "demo_image_5"),#imageLiteral(resourceName: "demo_image_5"),#imageLiteral(resourceName: "demo_image_5"),#imageLiteral(resourceName: "demo_image_5"),#imageLiteral(resourceName: "demo_image_5")])
39 | pictureItem.type = .read
40 | section.add(item: pictureItem)
41 | }else{
42 | //添加图片
43 | let pictureItem = ZJPictureTableItem(maxNumber: 9, column: 5, space: 8, width: self.view.frame.size.width, superVC: self)
44 | pictureItem.type = .edit
45 | section.add(item: pictureItem)
46 | }
47 | }
48 |
49 |
50 | // Do any additional setup after loading the view, typically from a nib.
51 | }
52 |
53 | override func didReceiveMemoryWarning() {
54 | super.didReceiveMemoryWarning()
55 | // Dispose of any resources that can be recreated.
56 | }
57 |
58 |
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/Other Demo/CommentsWithPicture/CommentsWithPicture/comments-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | NSCameraUsageDescription
26 | App需要您的同意,才能访问相机
27 | NSPhotoLibraryUsageDescription
28 | App需要您的同意,才能访问相册
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Other Demo/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 | workspace 'ZJTableViewDemo.xcworkspace'
4 | use_frameworks!
5 |
6 | # ignore all warnings from all pods
7 | inhibit_all_warnings!
8 |
9 | project 'NormalExample/NormalExample.xcodeproj'
10 | project 'ShoppingCartDemo/Demo2.xcodeproj'
11 | project 'CommentsWithPicture/CommentsWithPicture.xcodeproj'
12 |
13 |
14 | abstract_target 'ZJTableViewDemo' do
15 | pod 'ZJTableViewManager', '~> 1.0.3-beta'
16 |
17 | target 'Demo2' do
18 | project 'ShoppingCartDemo/Demo2.xcodeproj'
19 | end
20 |
21 | target 'CommentsWithPicture' do
22 | project 'CommentsWithPicture/CommentsWithPicture.xcodeproj'
23 | pod 'SwiftyStarRatingView'
24 | pod 'ImagePicker'
25 | pod 'SKPhotoBrowser', '~> 5.0.0'
26 | pod 'IQKeyboardManagerSwift'
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/Other Demo/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ImagePicker (3.1.0)
3 | - IQKeyboardManagerSwift (6.5.5)
4 | - SKPhotoBrowser (5.0.9)
5 | - SwiftyStarRatingView (1.0.4)
6 | - ZJTableViewManager (1.0.3-beta):
7 | - ZJTableViewManager/Core (= 1.0.3-beta)
8 | - ZJTableViewManager/Other (= 1.0.3-beta)
9 | - ZJTableViewManager/Core (1.0.3-beta)
10 | - ZJTableViewManager/Other (1.0.3-beta):
11 | - ZJTableViewManager/Core
12 |
13 | DEPENDENCIES:
14 | - ImagePicker
15 | - IQKeyboardManagerSwift
16 | - SKPhotoBrowser (~> 5.0.0)
17 | - SwiftyStarRatingView
18 | - ZJTableViewManager (~> 1.0.3-beta)
19 |
20 | SPEC REPOS:
21 | https://github.com/cocoapods/specs.git:
22 | - ImagePicker
23 | - IQKeyboardManagerSwift
24 | - SKPhotoBrowser
25 | - SwiftyStarRatingView
26 | - ZJTableViewManager
27 |
28 | SPEC CHECKSUMS:
29 | ImagePicker: db1fd7626337b2577c523bef5f499bbbe5a37079
30 | IQKeyboardManagerSwift: 0fb93310284665245591f50f7a5e38de615960b7
31 | SKPhotoBrowser: 668c29bdd9d4d276026fc131c55e96d902c2463c
32 | SwiftyStarRatingView: a2b0057700e0adeb8e7442c55d99cb53b531d2f4
33 | ZJTableViewManager: d13bcd3addfe0fff3cf1224a4c2e3fbc09048821
34 |
35 | PODFILE CHECKSUM: b7f182d059a35fc270761821f1d682d001aa7f5f
36 |
37 | COCOAPODS: 1.7.5
38 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQNSArray+Sort.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IQNSArray+Sort.swift
3 | // https://github.com/hackiftekhar/IQKeyboardManager
4 | // Copyright (c) 2013-16 Iftekhar Qurashi.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | import Foundation
25 | import UIKit
26 |
27 | /**
28 | UIView.subviews sorting category.
29 | */
30 | internal extension Array where Element: UIView {
31 |
32 | ///--------------
33 | /// MARK: Sorting
34 | ///--------------
35 |
36 | /**
37 | Returns the array by sorting the UIView's by their tag property.
38 | */
39 | func sortedArrayByTag() -> [Element] {
40 |
41 | return sorted(by: { (obj1: Element, obj2: Element) -> Bool in
42 |
43 | return (obj1.tag < obj2.tag)
44 | })
45 | }
46 |
47 | /**
48 | Returns the array by sorting the UIView's by their tag property.
49 | */
50 | func sortedArrayByPosition() -> [Element] {
51 |
52 | return sorted(by: { (obj1: Element, obj2: Element) -> Bool in
53 | if obj1.frame.minY != obj2.frame.minY {
54 | return obj1.frame.minY < obj2.frame.minY
55 | } else {
56 | return obj1.frame.minX < obj2.frame.minX
57 | }
58 | })
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQUIViewController+Additions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IQUIViewController+Additions.swift
3 | // https://github.com/hackiftekhar/IQKeyboardManager
4 | // Copyright (c) 2013-16 Iftekhar Qurashi.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | import UIKit
25 |
26 | private var kIQLayoutGuideConstraint = "kIQLayoutGuideConstraint"
27 |
28 | @objc public extension UIViewController {
29 |
30 | /**
31 | This method is provided to override by viewController's if the library lifts a viewController which you doesn't want to lift . This may happen if you have implemented side menu feature in your app and the library try to lift the side menu controller. Overriding this method in side menu class to return correct controller should fix the problem.
32 | */
33 | func parentIQContainerViewController() -> UIViewController? {
34 | return self
35 | }
36 |
37 | /**
38 | To set customized distance from keyboard for textField/textView. Can't be less than zero
39 |
40 | @deprecated Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview
41 | */
42 | @available(*, deprecated, message: "Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview.")
43 | @IBOutlet @objc var IQLayoutGuideConstraint: NSLayoutConstraint? {
44 | get {
45 |
46 | return objc_getAssociatedObject(self, &kIQLayoutGuideConstraint) as? NSLayoutConstraint
47 | }
48 |
49 | set(newValue) {
50 | objc_setAssociatedObject(self, &kIQLayoutGuideConstraint, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Constants/IQKeyboardManagerConstantsInternal.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IQKeyboardManagerConstantsInternal.swift
3 | // https://github.com/hackiftekhar/IQKeyboardManager
4 | // Copyright (c) 2013-16 Iftekhar Qurashi.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | import Foundation
25 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQToolbar/IQInvocation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IQInvocation.swift
3 | // https://github.com/hackiftekhar/IQKeyboardManager
4 | // Copyright (c) 2013-16 Iftekhar Qurashi.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | import UIKit
25 |
26 | @objc public class IQInvocation: NSObject {
27 | @objc public weak var target: AnyObject?
28 | @objc public var action: Selector
29 |
30 | @objc public init(_ target: AnyObject, _ action: Selector) {
31 | self.target = target
32 | self.action = action
33 | }
34 |
35 | @objc public func invoke(from: Any) {
36 | if let target = target {
37 | UIApplication.shared.sendAction(action, to: target, from: from, for: UIEvent())
38 | }
39 | }
40 |
41 | deinit {
42 | target = nil
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQToolbar/IQPreviousNextView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IQPreviousNextView.swift
3 | // https://github.com/hackiftekhar/IQKeyboardManager
4 | // Copyright (c) 2013-16 Iftekhar Qurashi.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | import UIKit
25 |
26 | @objc public class IQPreviousNextView: UIView {
27 |
28 | }
29 |
30 | //#if swift(>=5.1)
31 | //import SwiftUI
32 | //
33 | //struct IQPreviousNextViewSwiftUI: UIViewRepresentable {
34 | // func makeUIView(context: Context) -> IQPreviousNextView {
35 | // IQPreviousNextView(frame: .zero)
36 | // }
37 | //
38 | // func updateUIView(_ view: IQPreviousNextView, context: Context) {
39 | // }
40 | //}
41 | //
42 | //struct IQTextViewSwiftUI_Preview: PreviewProvider {
43 | // static var previews: some View {
44 | // IQPreviousNextViewSwiftUI()
45 | // }
46 | //}
47 | //
48 | //#endif
49 |
50 |
--------------------------------------------------------------------------------
/Other Demo/Pods/IQKeyboardManagerSwift/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2013-2017 Iftekhar Qurashi
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 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/AUTO@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/AUTO@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/OFF@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/OFF@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/ON@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/ON@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/cameraIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/cameraIcon@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/focusIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/focusIcon@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/selectedImageGallery@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/selectedImageGallery@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Images/video@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/ImagePicker/Images/video@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/LICENSE.md:
--------------------------------------------------------------------------------
1 | Licensed under the **MIT** license
2 |
3 | > Copyright (c) 2015 Hyper Interaktiv AS
4 | >
5 | > Permission is hereby granted, free of charge, to any person obtaining
6 | > a copy of this software and associated documentation files (the
7 | > "Software"), to deal in the Software without restriction, including
8 | > without limitation the rights to use, copy, modify, merge, publish,
9 | > distribute, sublicense, and/or sell copies of the Software, and to
10 | > permit persons to whom the Software is furnished to do so, subject to
11 | > the following conditions:
12 | >
13 | > The above copyright notice and this permission notice shall be
14 | > included in all copies or substantial portions of the Software.
15 | >
16 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/AssetManager.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import UIKit
3 | import Photos
4 |
5 | open class AssetManager {
6 |
7 | open static func getImage(_ name: String) -> UIImage {
8 | let traitCollection = UITraitCollection(displayScale: 3)
9 | var bundle = Bundle(for: AssetManager.self)
10 |
11 | if let resource = bundle.resourcePath, let resourceBundle = Bundle(path: resource + "/ImagePicker.bundle") {
12 | bundle = resourceBundle
13 | }
14 |
15 | return UIImage(named: name, in: bundle, compatibleWith: traitCollection) ?? UIImage()
16 | }
17 |
18 | open static func fetch(withConfiguration configuration: Configuration, _ completion: @escaping (_ assets: [PHAsset]) -> Void) {
19 | guard PHPhotoLibrary.authorizationStatus() == .authorized else { return }
20 |
21 | DispatchQueue.global(qos: .background).async {
22 | let fetchResult = configuration.allowVideoSelection
23 | ? PHAsset.fetchAssets(with: PHFetchOptions())
24 | : PHAsset.fetchAssets(with: .image, options: PHFetchOptions())
25 |
26 | if fetchResult.count > 0 {
27 | var assets = [PHAsset]()
28 | fetchResult.enumerateObjects({ object, _, _ in
29 | assets.insert(object, at: 0)
30 | })
31 |
32 | DispatchQueue.main.async {
33 | completion(assets)
34 | }
35 | }
36 | }
37 | }
38 |
39 | open static func resolveAsset(_ asset: PHAsset, size: CGSize = CGSize(width: 720, height: 1280), shouldPreferLowRes: Bool = false, completion: @escaping (_ image: UIImage?) -> Void) {
40 | let imageManager = PHImageManager.default()
41 | let requestOptions = PHImageRequestOptions()
42 | requestOptions.deliveryMode = shouldPreferLowRes ? .fastFormat : .highQualityFormat
43 | requestOptions.isNetworkAccessAllowed = true
44 |
45 | imageManager.requestImage(for: asset, targetSize: size, contentMode: .aspectFill, options: requestOptions) { image, info in
46 | if let info = info, info["PHImageFileUTIKey"] == nil {
47 | DispatchQueue.main.async(execute: {
48 | completion(image)
49 | })
50 | }
51 | }
52 | }
53 |
54 | open static func resolveAssets(_ assets: [PHAsset], size: CGSize = CGSize(width: 720, height: 1280)) -> [UIImage] {
55 | let imageManager = PHImageManager.default()
56 | let requestOptions = PHImageRequestOptions()
57 | requestOptions.isSynchronous = true
58 |
59 | var images = [UIImage]()
60 | for asset in assets {
61 | imageManager.requestImage(for: asset, targetSize: size, contentMode: .aspectFill, options: requestOptions) { image, _ in
62 | if let image = image {
63 | images.append(image)
64 | }
65 | }
66 | }
67 | return images
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/BottomView/ButtonPicker.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol ButtonPickerDelegate: class {
4 |
5 | func buttonDidPress()
6 | }
7 |
8 | class ButtonPicker: UIButton {
9 |
10 | struct Dimensions {
11 | static let borderWidth: CGFloat = 2
12 | static let buttonSize: CGFloat = 58
13 | static let buttonBorderSize: CGFloat = 68
14 | }
15 |
16 | var configuration = Configuration()
17 |
18 | lazy var numberLabel: UILabel = { [unowned self] in
19 | let label = UILabel()
20 | label.translatesAutoresizingMaskIntoConstraints = false
21 | label.font = self.configuration.numberLabelFont
22 |
23 | return label
24 | }()
25 |
26 | weak var delegate: ButtonPickerDelegate?
27 |
28 | // MARK: - Initializers
29 |
30 | public init(configuration: Configuration? = nil) {
31 | if let configuration = configuration {
32 | self.configuration = configuration
33 | }
34 | super.init(frame: .zero)
35 | configure()
36 | }
37 |
38 | override init(frame: CGRect) {
39 | super.init(frame: frame)
40 | configure()
41 | }
42 |
43 | func configure() {
44 | addSubview(numberLabel)
45 |
46 | subscribe()
47 | setupButton()
48 | setupConstraints()
49 | }
50 |
51 | deinit {
52 | NotificationCenter.default.removeObserver(self)
53 | }
54 |
55 | func subscribe() {
56 | NotificationCenter.default.addObserver(self,
57 | selector: #selector(recalculatePhotosCount(_:)),
58 | name: NSNotification.Name(rawValue: ImageStack.Notifications.imageDidPush),
59 | object: nil)
60 |
61 | NotificationCenter.default.addObserver(self,
62 | selector: #selector(recalculatePhotosCount(_:)),
63 | name: NSNotification.Name(rawValue: ImageStack.Notifications.imageDidDrop),
64 | object: nil)
65 |
66 | NotificationCenter.default.addObserver(self,
67 | selector: #selector(recalculatePhotosCount(_:)),
68 | name: NSNotification.Name(rawValue: ImageStack.Notifications.stackDidReload),
69 | object: nil)
70 | }
71 |
72 | required init?(coder aDecoder: NSCoder) {
73 | fatalError("init(coder:) has not been implemented")
74 | }
75 |
76 | // MARK: - Configuration
77 |
78 | func setupButton() {
79 | backgroundColor = UIColor.white
80 | layer.cornerRadius = Dimensions.buttonSize / 2
81 | accessibilityLabel = "Take photo"
82 | addTarget(self, action: #selector(pickerButtonDidPress(_:)), for: .touchUpInside)
83 | addTarget(self, action: #selector(pickerButtonDidHighlight(_:)), for: .touchDown)
84 | }
85 |
86 | // MARK: - Actions
87 |
88 | @objc func recalculatePhotosCount(_ notification: Notification) {
89 | guard let sender = notification.object as? ImageStack else { return }
90 | numberLabel.text = sender.assets.isEmpty ? "" : String(sender.assets.count)
91 | }
92 |
93 | @objc func pickerButtonDidPress(_ button: UIButton) {
94 | backgroundColor = UIColor.white
95 | numberLabel.textColor = UIColor.black
96 | numberLabel.sizeToFit()
97 | delegate?.buttonDidPress()
98 | }
99 |
100 | @objc func pickerButtonDidHighlight(_ button: UIButton) {
101 | numberLabel.textColor = UIColor.white
102 | backgroundColor = UIColor(red: 0.3, green: 0.3, blue: 0.3, alpha: 1)
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/BottomView/ImageStack.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Photos
3 |
4 | open class ImageStack {
5 |
6 | public struct Notifications {
7 | public static let imageDidPush = "imageDidPush"
8 | public static let imageDidDrop = "imageDidDrop"
9 | public static let stackDidReload = "stackDidReload"
10 | }
11 |
12 | open var assets = [PHAsset]()
13 | fileprivate let imageKey = "image"
14 |
15 | open func pushAsset(_ asset: PHAsset) {
16 | assets.append(asset)
17 | NotificationCenter.default.post(name: Notification.Name(rawValue: Notifications.imageDidPush), object: self, userInfo: [imageKey: asset])
18 | }
19 |
20 | open func dropAsset(_ asset: PHAsset) {
21 | assets = assets.filter {$0 != asset}
22 | NotificationCenter.default.post(name: Notification.Name(rawValue: Notifications.imageDidDrop), object: self, userInfo: [imageKey: asset])
23 | }
24 |
25 | open func resetAssets(_ assetsArray: [PHAsset]) {
26 | assets = assetsArray
27 | NotificationCenter.default.post(name: Notification.Name(rawValue: Notifications.stackDidReload), object: self, userInfo: nil)
28 | }
29 |
30 | open func containsAsset(_ asset: PHAsset) -> Bool {
31 | return assets.contains(asset)
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/Helper.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import AVFoundation
3 |
4 | struct Helper {
5 |
6 | static var previousOrientation = UIDeviceOrientation.unknown
7 |
8 | static func getTransform(fromDeviceOrientation orientation: UIDeviceOrientation) -> CGAffineTransform {
9 | switch orientation {
10 | case .landscapeLeft:
11 | return CGAffineTransform(rotationAngle: CGFloat.pi * 0.5)
12 | case .landscapeRight:
13 | return CGAffineTransform(rotationAngle: -(CGFloat.pi * 0.5))
14 | case .portraitUpsideDown:
15 | return CGAffineTransform(rotationAngle: CGFloat.pi)
16 | default:
17 | return CGAffineTransform.identity
18 | }
19 | }
20 |
21 | static func getVideoOrientation(fromDeviceOrientation orientation: UIDeviceOrientation) -> AVCaptureVideoOrientation {
22 | switch orientation {
23 | case .landscapeLeft:
24 | return .landscapeRight
25 | case .landscapeRight:
26 | return .landscapeLeft
27 | case .portraitUpsideDown:
28 | return .portraitUpsideDown
29 | default:
30 | return .portrait
31 | }
32 | }
33 |
34 | static func videoOrientation() -> AVCaptureVideoOrientation {
35 | return getVideoOrientation(fromDeviceOrientation: previousOrientation)
36 | }
37 |
38 | static func screenSizeForOrientation() -> CGSize {
39 | switch UIDevice.current.orientation {
40 | case .landscapeLeft, .landscapeRight:
41 | return CGSize(width: UIScreen.main.bounds.height,
42 | height: UIScreen.main.bounds.width)
43 | default:
44 | return UIScreen.main.bounds.size
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/ImageGallery/ImageGalleryLayout.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ImageGalleryLayout: UICollectionViewFlowLayout {
4 |
5 | let configuration: Configuration
6 |
7 | init(configuration: Configuration) {
8 | self.configuration = configuration
9 | super.init()
10 | }
11 |
12 | required init?(coder aDecoder: NSCoder) {
13 | fatalError("init(coder:) has not been implemented")
14 | }
15 |
16 | override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
17 | guard let attributes = super.layoutAttributesForElements(in: rect) else {
18 | return super.layoutAttributesForElements(in: rect)
19 | }
20 |
21 | let newAttributes = attributes.map({ (attribute) -> UICollectionViewLayoutAttributes in
22 | // swiftlint:disable force_cast
23 | let newAttribute = attribute.copy() as! UICollectionViewLayoutAttributes
24 | newAttribute.transform = configuration.rotationTransform
25 | return newAttribute
26 | })
27 |
28 | return newAttributes
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/ImageGallery/ImageGalleryViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ImageGalleryViewCell: UICollectionViewCell {
4 |
5 | lazy var imageView = UIImageView()
6 | lazy var selectedImageView = UIImageView()
7 | private var videoInfoView: VideoInfoView
8 |
9 | private let videoInfoBarHeight: CGFloat = 15
10 | var duration: TimeInterval? {
11 | didSet {
12 | if let duration = duration, duration > 0 {
13 | self.videoInfoView.duration = duration
14 | self.videoInfoView.isHidden = false
15 | } else {
16 | self.videoInfoView.isHidden = true
17 | }
18 | }
19 | }
20 |
21 | override init(frame: CGRect) {
22 | let videoBarFrame = CGRect(x: 0, y: frame.height - self.videoInfoBarHeight,
23 | width: frame.width, height: self.videoInfoBarHeight)
24 | videoInfoView = VideoInfoView(frame: videoBarFrame)
25 | super.init(frame: frame)
26 |
27 | for view in [imageView, selectedImageView, videoInfoView] as [UIView] {
28 | view.contentMode = .scaleAspectFill
29 | view.translatesAutoresizingMaskIntoConstraints = false
30 | view.clipsToBounds = true
31 | contentView.addSubview(view)
32 | }
33 |
34 | isAccessibilityElement = true
35 | accessibilityLabel = "Photo"
36 |
37 | setupConstraints()
38 | }
39 |
40 | required init?(coder aDecoder: NSCoder) {
41 | fatalError("init(coder:) has not been implemented")
42 | }
43 |
44 | // MARK: - Configuration
45 |
46 | func configureCell(_ image: UIImage) {
47 | imageView.image = image
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/ImageGallery/ImageGalleryViewDataSource.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | extension ImageGalleryView: UICollectionViewDataSource {
4 |
5 | struct CollectionView {
6 | static let reusableIdentifier = "imagesReusableIdentifier"
7 | }
8 |
9 | public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
10 | displayNoImagesMessage(assets.isEmpty)
11 | return assets.count
12 | }
13 |
14 | public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
15 | guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CollectionView.reusableIdentifier,
16 | for: indexPath) as? ImageGalleryViewCell else { return UICollectionViewCell() }
17 |
18 | let asset = assets[(indexPath as NSIndexPath).row]
19 |
20 | AssetManager.resolveAsset(asset, size: CGSize(width: 160, height: 240), shouldPreferLowRes: configuration.useLowResolutionPreviewImage) { image in
21 | if let image = image {
22 | cell.configureCell(image)
23 |
24 | if (indexPath as NSIndexPath).row == 0 && self.shouldTransform {
25 | cell.transform = CGAffineTransform(scaleX: 0, y: 0)
26 |
27 | UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: UIViewAnimationOptions(), animations: {
28 | cell.transform = CGAffineTransform.identity
29 | }) { _ in }
30 |
31 | self.shouldTransform = false
32 | }
33 |
34 | if self.selectedStack.containsAsset(asset) {
35 | cell.selectedImageView.image = AssetManager.getImage("selectedImageGallery")
36 | cell.selectedImageView.alpha = 1
37 | cell.selectedImageView.transform = CGAffineTransform.identity
38 | } else {
39 | cell.selectedImageView.image = nil
40 | }
41 | cell.duration = asset.duration
42 | }
43 | }
44 |
45 | return cell
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/ImageGallery/VideoInfoView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class VideoInfoView: UIView {
4 |
5 | var duration: TimeInterval? {
6 | didSet {
7 | videoInfoLabel.text = dateFormatter.string(from: duration ?? 0)
8 | }
9 | }
10 |
11 | private lazy var videoIcon: UIImageView = {
12 | var videoIcon = UIImageView(image: AssetManager.getImage("video"))
13 | videoIcon.frame = CGRect(x: 3,
14 | y: 0,
15 | width: self.bounds.height,
16 | height: self.bounds.height)
17 | videoIcon.contentMode = .scaleAspectFit
18 | return videoIcon
19 | }()
20 |
21 | private lazy var videoInfoLabel: UILabel = {
22 | let videoInfoLabel = UILabel(frame: CGRect(x: 0,
23 | y: 0,
24 | width: self.bounds.width - 5,
25 | height: self.bounds.height))
26 | videoInfoLabel.font = UIFont.systemFont(ofSize: 10)
27 | videoInfoLabel.textColor = .white
28 | videoInfoLabel.textAlignment = .right
29 | videoInfoLabel.text = self.dateFormatter.string(from: self.duration ?? 0)
30 | return videoInfoLabel
31 | }()
32 |
33 | private lazy var dateFormatter: DateComponentsFormatter = {
34 | let formatter = DateComponentsFormatter()
35 | formatter.zeroFormattingBehavior = .pad
36 | formatter.allowedUnits = [.hour, .minute, .second]
37 | formatter.unitsStyle = .positional
38 | return formatter
39 | }()
40 |
41 | override init(frame: CGRect) {
42 | super.init(frame: frame)
43 |
44 | backgroundColor = UIColor(white: 0, alpha: 0.5)
45 | addSubview(self.videoIcon)
46 | addSubview(self.videoInfoLabel)
47 | }
48 |
49 | required init?(coder aDecoder: NSCoder) {
50 | fatalError("init(coder:) has not been implemented")
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ImagePicker/Source/LocationManager.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import CoreLocation
3 |
4 | class LocationManager: NSObject, CLLocationManagerDelegate {
5 | var locationManager = CLLocationManager()
6 | var latestLocation: CLLocation?
7 |
8 | override init() {
9 | super.init()
10 | locationManager.delegate = self
11 | locationManager.desiredAccuracy = kCLLocationAccuracyBest
12 | locationManager.requestWhenInUseAuthorization()
13 | }
14 |
15 | func startUpdatingLocation() {
16 | locationManager.startUpdatingLocation()
17 | }
18 |
19 | func stopUpdatingLocation() {
20 | locationManager.stopUpdatingLocation()
21 | }
22 |
23 | // MARK: - CLLocationManagerDelegate
24 |
25 | func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
26 | // Pick the location with best (= smallest value) horizontal accuracy
27 | latestLocation = locations.sorted { $0.horizontalAccuracy < $1.horizontalAccuracy }.first
28 | }
29 |
30 | func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
31 | if status == .authorizedAlways || status == .authorizedWhenInUse {
32 | locationManager.startUpdatingLocation()
33 | } else {
34 | locationManager.stopUpdatingLocation()
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ImagePicker (3.1.0)
3 | - IQKeyboardManagerSwift (6.5.5)
4 | - SKPhotoBrowser (5.0.9)
5 | - SwiftyStarRatingView (1.0.4)
6 | - ZJTableViewManager (1.0.3-beta):
7 | - ZJTableViewManager/Core (= 1.0.3-beta)
8 | - ZJTableViewManager/Other (= 1.0.3-beta)
9 | - ZJTableViewManager/Core (1.0.3-beta)
10 | - ZJTableViewManager/Other (1.0.3-beta):
11 | - ZJTableViewManager/Core
12 |
13 | DEPENDENCIES:
14 | - ImagePicker
15 | - IQKeyboardManagerSwift
16 | - SKPhotoBrowser (~> 5.0.0)
17 | - SwiftyStarRatingView
18 | - ZJTableViewManager (~> 1.0.3-beta)
19 |
20 | SPEC REPOS:
21 | https://github.com/cocoapods/specs.git:
22 | - ImagePicker
23 | - IQKeyboardManagerSwift
24 | - SKPhotoBrowser
25 | - SwiftyStarRatingView
26 | - ZJTableViewManager
27 |
28 | SPEC CHECKSUMS:
29 | ImagePicker: db1fd7626337b2577c523bef5f499bbbe5a37079
30 | IQKeyboardManagerSwift: 0fb93310284665245591f50f7a5e38de615960b7
31 | SKPhotoBrowser: 668c29bdd9d4d276026fc131c55e96d902c2463c
32 | SwiftyStarRatingView: a2b0057700e0adeb8e7442c55d99cb53b531d2f4
33 | ZJTableViewManager: d13bcd3addfe0fff3cf1224a4c2e3fbc09048821
34 |
35 | PODFILE CHECKSUM: b7f182d059a35fc270761821f1d682d001aa7f5f
36 |
37 | COCOAPODS: 1.7.5
38 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 suzuki_keishi
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 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKCache.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKCache.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by Kevin Wolkober on 6/13/16.
6 | // Copyright © 2016 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class SKCache {
12 | open static let sharedCache = SKCache()
13 | open var imageCache: SKCacheable
14 |
15 | init() {
16 | self.imageCache = SKDefaultImageCache()
17 | }
18 |
19 | open func imageForKey(_ key: String) -> UIImage? {
20 | guard let cache = imageCache as? SKImageCacheable else {
21 | return nil
22 | }
23 |
24 | return cache.imageForKey(key)
25 | }
26 |
27 | open func setImage(_ image: UIImage, forKey key: String) {
28 | guard let cache = imageCache as? SKImageCacheable else {
29 | return
30 | }
31 |
32 | cache.setImage(image, forKey: key)
33 | }
34 |
35 | open func removeImageForKey(_ key: String) {
36 | guard let cache = imageCache as? SKImageCacheable else {
37 | return
38 | }
39 |
40 | cache.removeImageForKey(key)
41 | }
42 |
43 | open func removeAllImages() {
44 | guard let cache = imageCache as? SKImageCacheable else {
45 | return
46 | }
47 |
48 | cache.removeAllImages()
49 | }
50 |
51 | open func imageForRequest(_ request: URLRequest) -> UIImage? {
52 | guard let cache = imageCache as? SKRequestResponseCacheable else {
53 | return nil
54 | }
55 |
56 | if let response = cache.cachedResponseForRequest(request) {
57 | return UIImage(data: response.data)
58 | }
59 | return nil
60 | }
61 |
62 | open func setImageData(_ data: Data, response: URLResponse, request: URLRequest?) {
63 | guard let cache = imageCache as? SKRequestResponseCacheable, let request = request else {
64 | return
65 | }
66 | let cachedResponse = CachedURLResponse(response: response, data: data)
67 | cache.storeCachedResponse(cachedResponse, forRequest: request)
68 | }
69 | }
70 |
71 | class SKDefaultImageCache: SKImageCacheable {
72 | var cache: NSCache
73 |
74 | init() {
75 | cache = NSCache()
76 | }
77 |
78 | func imageForKey(_ key: String) -> UIImage? {
79 | return cache.object(forKey: key as AnyObject) as? UIImage
80 | }
81 |
82 | func setImage(_ image: UIImage, forKey key: String) {
83 | cache.setObject(image, forKey: key as AnyObject)
84 | }
85 |
86 | func removeImageForKey(_ key: String) {
87 | cache.removeObject(forKey: key as AnyObject)
88 | }
89 |
90 | func removeAllImages() {
91 | cache.removeAllObjects()
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKCacheable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKCacheable.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by Kevin Wolkober on 6/13/16.
6 | // Copyright © 2016 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit.UIImage
10 |
11 | public protocol SKCacheable {}
12 | public protocol SKImageCacheable: SKCacheable {
13 | func imageForKey(_ key: String) -> UIImage?
14 | func setImage(_ image: UIImage, forKey key: String)
15 | func removeImageForKey(_ key: String)
16 | func removeAllImages()
17 | }
18 |
19 | public protocol SKRequestResponseCacheable: SKCacheable {
20 | func cachedResponseForRequest(_ request: URLRequest) -> CachedURLResponse?
21 | func storeCachedResponse(_ cachedResponse: CachedURLResponse, forRequest request: URLRequest)
22 | }
23 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKCaptionView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKCaptionView.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by suzuki_keishi on 2015/10/07.
6 | // Copyright © 2015 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class SKCaptionView: UIView {
12 | fileprivate var photo: SKPhotoProtocol?
13 | fileprivate var photoLabel: UILabel!
14 | fileprivate var photoLabelPadding: CGFloat = 10
15 |
16 | required public init?(coder aDecoder: NSCoder) {
17 | super.init(coder: aDecoder)
18 | }
19 |
20 | public override init(frame: CGRect) {
21 | super.init(frame: frame)
22 | }
23 |
24 | public convenience init(photo: SKPhotoProtocol) {
25 | let screenBound = UIScreen.main.bounds
26 | self.init(frame: CGRect(x: 0, y: 0, width: screenBound.size.width, height: screenBound.size.height))
27 | self.photo = photo
28 | setup()
29 | }
30 |
31 | open override func sizeThatFits(_ size: CGSize) -> CGSize {
32 | guard let text = photoLabel.text, text.count > 0 else {
33 | return CGSize.zero
34 | }
35 |
36 | let font: UIFont = photoLabel.font
37 | let width: CGFloat = size.width - photoLabelPadding * 2
38 | let height: CGFloat = photoLabel.font.lineHeight * CGFloat(photoLabel.numberOfLines)
39 |
40 | let attributedText = NSAttributedString(string: text, attributes: [NSAttributedStringKey.font: font])
41 | let textSize = attributedText.boundingRect(with: CGSize(width: width, height: height), options: .usesLineFragmentOrigin, context: nil).size
42 |
43 | return CGSize(width: textSize.width, height: textSize.height + photoLabelPadding * 2)
44 | }
45 | }
46 |
47 | private extension SKCaptionView {
48 | func setup() {
49 | isOpaque = false
50 | autoresizingMask = [.flexibleWidth, .flexibleTopMargin, .flexibleRightMargin, .flexibleLeftMargin]
51 |
52 | // setup photoLabel
53 | setupPhotoLabel()
54 | }
55 |
56 | func setupPhotoLabel() {
57 | photoLabel = UILabel(frame: CGRect(x: photoLabelPadding, y: 0, width: bounds.size.width - (photoLabelPadding * 2), height: bounds.size.height))
58 | photoLabel.autoresizingMask = [.flexibleWidth, .flexibleHeight]
59 | photoLabel.isOpaque = false
60 | photoLabel.backgroundColor = .clear
61 | photoLabel.textColor = SKCaptionOptions.textColor
62 | photoLabel.textAlignment = SKCaptionOptions.textAlignment
63 | photoLabel.lineBreakMode = SKCaptionOptions.lineBreakMode
64 | photoLabel.numberOfLines = SKCaptionOptions.numberOfLine
65 | photoLabel.font = SKCaptionOptions.font
66 | photoLabel.shadowColor = UIColor(white: 0.0, alpha: 0.5)
67 | photoLabel.shadowOffset = CGSize(width: 0.0, height: 1.0)
68 | photoLabel.text = photo?.caption
69 | addSubview(photoLabel)
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKDetectingImageView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKDetectingImageView.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by suzuki_keishi on 2015/10/01.
6 | // Copyright © 2015 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @objc protocol SKDetectingImageViewDelegate {
12 | func handleImageViewSingleTap(_ touchPoint: CGPoint)
13 | func handleImageViewDoubleTap(_ touchPoint: CGPoint)
14 | }
15 |
16 | class SKDetectingImageView: UIImageView {
17 | weak var delegate: SKDetectingImageViewDelegate?
18 |
19 | required init?(coder aDecoder: NSCoder) {
20 | super.init(coder: aDecoder)
21 | setup()
22 | }
23 |
24 | override init(frame: CGRect) {
25 | super.init(frame: frame)
26 | setup()
27 | }
28 |
29 | @objc func handleDoubleTap(_ recognizer: UITapGestureRecognizer) {
30 | delegate?.handleImageViewDoubleTap(recognizer.location(in: self))
31 | }
32 |
33 | @objc func handleSingleTap(_ recognizer: UITapGestureRecognizer) {
34 | delegate?.handleImageViewSingleTap(recognizer.location(in: self))
35 | }
36 | }
37 |
38 | private extension SKDetectingImageView {
39 | func setup() {
40 | isUserInteractionEnabled = true
41 |
42 | let doubleTap = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(_:)))
43 | doubleTap.numberOfTapsRequired = 2
44 | addGestureRecognizer(doubleTap)
45 |
46 | let singleTap = UITapGestureRecognizer(target: self, action: #selector(handleSingleTap(_:)))
47 | singleTap.require(toFail: doubleTap)
48 | addGestureRecognizer(singleTap)
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKDetectingView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKDetectingView.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by suzuki_keishi on 2015/10/01.
6 | // Copyright © 2015 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @objc protocol SKDetectingViewDelegate {
12 | func handleSingleTap(_ view: UIView, touch: UITouch)
13 | func handleDoubleTap(_ view: UIView, touch: UITouch)
14 | }
15 |
16 | class SKDetectingView: UIView {
17 | weak var delegate: SKDetectingViewDelegate?
18 |
19 | override func touchesEnded(_ touches: Set, with event: UIEvent?) {
20 | super.touchesEnded(touches, with: event)
21 | defer {
22 | _ = next
23 | }
24 |
25 | guard let touch = touches.first else {
26 | return
27 | }
28 | switch touch.tapCount {
29 | case 1 : handleSingleTap(touch)
30 | case 2 : handleDoubleTap(touch)
31 | default: break
32 | }
33 | }
34 |
35 | func handleSingleTap(_ touch: UITouch) {
36 | delegate?.handleSingleTap(self, touch: touch)
37 | }
38 |
39 | func handleDoubleTap(_ touch: UITouch) {
40 | delegate?.handleDoubleTap(self, touch: touch)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKIndicatorView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKIndicatorView.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by suzuki_keishi on 2015/10/09.
6 | // Copyright © 2015 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SKIndicatorView: UIActivityIndicatorView {
12 | required init(coder aDecoder: NSCoder) {
13 | super.init(coder: aDecoder)
14 | }
15 |
16 | override init(frame: CGRect) {
17 | super.init(frame: frame)
18 | center = CGPoint(x: frame.width / 2, y: frame.height / 2)
19 | activityIndicatorViewStyle = SKPhotoBrowserOptions.indicatorStyle
20 | color = SKPhotoBrowserOptions.indicatorColor
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKLocalPhoto.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKLocalPhoto.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by Antoine Barrault on 13/04/2016.
6 | // Copyright © 2016 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // MARK: - SKLocalPhoto
12 | open class SKLocalPhoto: NSObject, SKPhotoProtocol {
13 |
14 | open var underlyingImage: UIImage!
15 | open var photoURL: String!
16 | open var contentMode: UIViewContentMode = .scaleToFill
17 | open var shouldCachePhotoURLImage: Bool = false
18 | open var caption: String?
19 | open var index: Int = 0
20 |
21 | override init() {
22 | super.init()
23 | }
24 |
25 | convenience init(url: String) {
26 | self.init()
27 | photoURL = url
28 | }
29 |
30 | convenience init(url: String, holder: UIImage?) {
31 | self.init()
32 | photoURL = url
33 | underlyingImage = holder
34 | }
35 |
36 | open func checkCache() {}
37 |
38 | open func loadUnderlyingImageAndNotify() {
39 |
40 | if underlyingImage != nil && photoURL == nil {
41 | loadUnderlyingImageComplete()
42 | }
43 |
44 | if photoURL != nil {
45 | // Fetch Image
46 | if FileManager.default.fileExists(atPath: photoURL) {
47 | if let data = FileManager.default.contents(atPath: photoURL) {
48 | self.loadUnderlyingImageComplete()
49 | if let image = UIImage(data: data) {
50 | self.underlyingImage = image
51 | self.loadUnderlyingImageComplete()
52 | }
53 | }
54 | }
55 | }
56 | }
57 |
58 | open func loadUnderlyingImageComplete() {
59 | NotificationCenter.default.post(name: Notification.Name(rawValue: SKPHOTO_LOADING_DID_END_NOTIFICATION), object: self)
60 | }
61 |
62 | // MARK: - class func
63 | open class func photoWithImageURL(_ url: String) -> SKLocalPhoto {
64 | return SKLocalPhoto(url: url)
65 | }
66 |
67 | open class func photoWithImageURL(_ url: String, holder: UIImage?) -> SKLocalPhoto {
68 | return SKLocalPhoto(url: url, holder: holder)
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKMesurement.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKMesurement.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by 鈴木 啓司 on 2016/08/09.
6 | // Copyright © 2016年 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | struct SKMesurement {
13 | static let isPhone: Bool = UIDevice.current.userInterfaceIdiom == .phone
14 | static let isPad: Bool = UIDevice.current.userInterfaceIdiom == .pad
15 | static var statusBarH: CGFloat {
16 | return UIApplication.shared.statusBarFrame.height
17 | }
18 | static var screenHeight: CGFloat {
19 | return UIScreen.main.bounds.height
20 | }
21 | static var screenWidth: CGFloat {
22 | return UIScreen.main.bounds.width
23 | }
24 | static var screenScale: CGFloat {
25 | return UIScreen.main.scale
26 | }
27 | static var screenRatio: CGFloat {
28 | return screenWidth / screenHeight
29 | }
30 | static var isPhoneX: Bool {
31 | if isPhone && UIScreen.main.nativeBounds.height == 2436 {
32 | return true
33 | }
34 | return false
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh@2x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_back_wh@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh@2x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_close_wh@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh@2x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_delete_wh@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh@2x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.bundle/images/btn_common_forward_wh@3x.png
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowser.h:
--------------------------------------------------------------------------------
1 | //
2 | // SKPhotoBrowser.h
3 | // SKPhotoBrowser
4 | //
5 | // Created by 鈴木 啓司 on 2015/10/09.
6 | // Copyright © 2015年 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for SKPhotoBrowser.
12 | FOUNDATION_EXPORT double SKPhotoBrowserVersionNumber;
13 |
14 | //! Project version string for SKPhotoBrowser.
15 | FOUNDATION_EXPORT const unsigned char SKPhotoBrowserVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKPhotoBrowserOptions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKPhotoBrowserOptions.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by 鈴木 啓司 on 2016/08/18.
6 | // Copyright © 2016年 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public struct SKPhotoBrowserOptions {
12 | public static var displayStatusbar: Bool = false
13 | public static var displayCloseButton: Bool = true
14 | public static var displayDeleteButton: Bool = false
15 |
16 | public static var displayAction: Bool = true
17 | public static var shareExtraCaption: String?
18 | public static var actionButtonTitles: [String]?
19 |
20 | public static var displayCounterLabel: Bool = true
21 | public static var displayBackAndForwardButton: Bool = true
22 |
23 | public static var displayHorizontalScrollIndicator: Bool = true
24 | public static var displayVerticalScrollIndicator: Bool = true
25 | public static var displayPagingHorizontalScrollIndicator: Bool = true
26 |
27 | public static var bounceAnimation: Bool = false
28 | public static var enableZoomBlackArea: Bool = true
29 | public static var enableSingleTapDismiss: Bool = false
30 |
31 | public static var backgroundColor: UIColor = .black
32 | public static var indicatorColor: UIColor = .white
33 | public static var indicatorStyle: UIActivityIndicatorViewStyle = .whiteLarge
34 |
35 | /// By default close button is on left side and delete button is on right.
36 | ///
37 | /// Set this property to **true** for swap they.
38 | ///
39 | /// Default: false
40 | public static var swapCloseAndDeleteButtons: Bool = false
41 | public static var disableVerticalSwipe: Bool = false
42 |
43 | /// if this value is true, the long photo width will match the screen,
44 | /// and the minScale is 1.0, the maxScale is 2.5
45 | /// Default: false
46 | public static var longPhotoWidthMatchScreen: Bool = false
47 | }
48 |
49 | public struct SKButtonOptions {
50 | public static var closeButtonPadding: CGPoint = CGPoint(x: 5, y: 20)
51 | public static var deleteButtonPadding: CGPoint = CGPoint(x: 5, y: 20)
52 | }
53 |
54 | public struct SKCaptionOptions {
55 | public static var textColor: UIColor = .white
56 | public static var textAlignment: NSTextAlignment = .center
57 | public static var numberOfLine: Int = 3
58 | public static var lineBreakMode: NSLineBreakMode = .byTruncatingTail
59 | public static var font: UIFont = .systemFont(ofSize: 17.0)
60 | }
61 |
62 | public struct SKToolbarOptions {
63 | public static var textColor: UIColor = .white
64 | public static var font: UIFont = .systemFont(ofSize: 17.0)
65 | public static var textShadowColor: UIColor = .black
66 | }
67 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/SKToolbar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SKToolbar.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by keishi_suzuki on 2017/12/20.
6 | // Copyright © 2017年 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | // helpers which often used
12 | private let bundle = Bundle(for: SKPhotoBrowser.self)
13 |
14 | class SKToolbar: UIToolbar {
15 | var toolActionButton: UIBarButtonItem!
16 |
17 | fileprivate weak var browser: SKPhotoBrowser?
18 |
19 | required init?(coder aDecoder: NSCoder) {
20 | super.init(coder: aDecoder)
21 | }
22 |
23 | override init(frame: CGRect) {
24 | super.init(frame: frame)
25 | }
26 |
27 | convenience init(frame: CGRect, browser: SKPhotoBrowser) {
28 | self.init(frame: frame)
29 | self.browser = browser
30 |
31 | setupApperance()
32 | setupToolbar()
33 | }
34 | }
35 |
36 | private extension SKToolbar {
37 | func setupApperance() {
38 | backgroundColor = .clear
39 | clipsToBounds = true
40 | isTranslucent = true
41 | setBackgroundImage(UIImage(), forToolbarPosition: .any, barMetrics: .default)
42 | }
43 |
44 | func setupToolbar() {
45 | toolActionButton = UIBarButtonItem(barButtonSystemItem: .action, target: browser, action: #selector(SKPhotoBrowser.actionButtonPressed))
46 | toolActionButton.tintColor = UIColor.white
47 |
48 | var items = [UIBarButtonItem]()
49 | items.append(UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: self, action: nil))
50 | if SKPhotoBrowserOptions.displayAction {
51 | items.append(toolActionButton)
52 | }
53 | setItems(items, animated: false)
54 | }
55 |
56 | func setupActionButton() {
57 | }
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/UIApplication+UIWindow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIApplication+UIWindow.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by Josef Dolezal on 25/09/2017.
6 | // Copyright © 2017 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | internal extension UIApplication {
12 | var preferredApplicationWindow: UIWindow? {
13 | // Since delegate window is of type UIWindow??, we have to
14 | // unwrap it twice to be sure the window is not nil
15 | if let appWindow = UIApplication.shared.delegate?.window, let window = appWindow {
16 | return window
17 | } else if let window = UIApplication.shared.keyWindow {
18 | return window
19 | }
20 |
21 | return nil
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/extensions/UIImage+Rotation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+Rotation.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by K Rummler on 15/03/16.
6 | // Copyright © 2016 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIImage {
12 | func rotateImageByOrientation() -> UIImage {
13 | // No-op if the orientation is already correct
14 | guard self.imageOrientation != .up else {
15 | return self
16 | }
17 |
18 | let transform = calculateAffineTransform()
19 |
20 | // Now we draw the underlying CGImage into a new context, applying the transform
21 | // calculated above.
22 | let ctx = CGContext(data: nil, width: Int(self.size.width), height: Int(self.size.height),
23 | bitsPerComponent: self.cgImage!.bitsPerComponent, bytesPerRow: 0,
24 | space: self.cgImage!.colorSpace!,
25 | bitmapInfo: self.cgImage!.bitmapInfo.rawValue)
26 | ctx!.concatenate(transform)
27 |
28 | switch self.imageOrientation {
29 | case .left, .leftMirrored, .right, .rightMirrored:
30 | ctx!.draw(self.cgImage!, in: CGRect(x: 0, y: 0, width: size.height, height: size.width))
31 |
32 | default:
33 | ctx!.draw(self.cgImage!, in: CGRect(x: 0, y: 0, width: size.width, height: size.height))
34 | }
35 |
36 | // And now we just create a new UIImage from the drawing context
37 | if let cgImage = ctx!.makeImage() {
38 | return UIImage(cgImage: cgImage)
39 | } else {
40 | return self
41 | }
42 | }
43 |
44 | fileprivate func calculateAffineTransform() -> CGAffineTransform {
45 | // We need to calculate the proper transformation to make the image upright.
46 | // We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored.
47 | var transform = CGAffineTransform.identity
48 |
49 | switch self.imageOrientation {
50 | case .down, .downMirrored:
51 | transform = transform.translatedBy(x: self.size.width, y: self.size.height)
52 | transform = transform.rotated(by: .pi)
53 |
54 | case .left, .leftMirrored:
55 | transform = transform.translatedBy(x: self.size.width, y: 0)
56 | transform = transform.rotated(by: .pi / 2)
57 |
58 | case .right, .rightMirrored:
59 | transform = transform.translatedBy(x: 0, y: self.size.height)
60 | transform = transform.rotated(by: -.pi / 2)
61 |
62 | default:
63 | break
64 | }
65 |
66 | switch self.imageOrientation {
67 | case .upMirrored, .downMirrored:
68 | transform = transform.translatedBy(x: self.size.width, y: 0)
69 | transform = transform.scaledBy(x: -1, y: 1)
70 |
71 | case .leftMirrored, .rightMirrored:
72 | transform = transform.translatedBy(x: self.size.height, y: 0)
73 | transform = transform.scaledBy(x: -1, y: 1)
74 |
75 | default:
76 | break
77 | }
78 |
79 | return transform
80 | }
81 | }
82 |
83 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SKPhotoBrowser/SKPhotoBrowser/extensions/UIView+Radius.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Radius.swift
3 | // SKPhotoBrowser
4 | //
5 | // Created by K Rummler on 15/03/16.
6 | // Copyright © 2016 suzuki_keishi. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIView {
12 | func addCornerRadiusAnimation(_ from: CGFloat, to: CGFloat, duration: CFTimeInterval) {
13 | let animation = CABasicAnimation(keyPath: "cornerRadius")
14 | animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
15 | animation.fromValue = from
16 | animation.toValue = to
17 | animation.duration = duration
18 | self.layer.add(animation, forKey: "cornerRadius")
19 | self.layer.cornerRadius = to
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Other Demo/Pods/SwiftyStarRatingView/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ####A simple star rating view written in pure swift, lightweight but powerful.
4 |
5 | ######[🇨🇳中文介绍](http://www.jianshu.com/p/28d5f0bac8fd)
6 |
7 | ##Screenshots
8 |
9 |
10 |
11 |
12 |
13 | ## Requirements
14 |
15 | - iOS 8.0+
16 | - Xcode 8
17 | - Swift 3.0
18 |
19 | ##CocoaPods
20 |
21 | CocoaPods is the recommended way to add SwiftyStarRatingView to your project.
22 |
23 | Add a pod entry for SwiftyStarRatingView to your Podfile.
24 |
25 | ```
26 | pod 'SwiftyStarRatingView'
27 | ```
28 | Second, install SwiftyStarRatingView into your project:
29 |
30 | ```
31 | pod install
32 | ```
33 |
34 | ## Manually
35 |
36 | 1. Download the latest code version .
37 | 2. Open your project in Xcode,drag the `SwiftyStarRatingView` folder into your project. Make sure to select Copy items when asked if you extracted the code archive outside of your project.
38 |
39 |
40 | ## Usage
41 |
42 | ####Create a simple rating view:
43 |
44 | ```
45 | let starRatingView = SwiftyStarRatingView()
46 |
47 | starRatingView.frame = CGRect(x: x, y: y, width: width, height: height)
48 |
49 | starRatingView.maximumValue = 5 //default is 5
50 | starRatingView.minimumValue = 0 //default is 0
51 | starRatingView.value = 3 //default is 0
52 |
53 | starRatingView.tintColor = UIColor.yellow
54 |
55 | starRatingView.addTarget(self, action: #selector(function), for: .valueChanged)
56 |
57 | self.view.addSubview(starRatingView)
58 | ```
59 |
60 | ####Setting this property to control whether to display a half stars:
61 |
62 | ```
63 | starRatingView.allowsHalfStars = true //default is true
64 | starRatingView.value = 3.5 //default is 0
65 | ```
66 |
67 | ####Whether accurate display:
68 |
69 | ```
70 | starRatingView.accurateHalfStars = true //default is true
71 | ```
72 |
73 | ####Always callback or just stop touch:
74 |
75 | ```
76 | starRatingView.continuous = true //default is true
77 | ```
78 |
79 | ####Use custom image:
80 |
81 | ```
82 | starRatingView.halfStarImage = UIImage(named: "half.png")
83 | starRatingView.emptyStarImage = UIImage(named: "empty.png")
84 | starRatingView.filledStarImage = UIImage(named: "filled.png")
85 | ```
86 |
87 | ####StoryBoard or XIB:
88 |
89 | `SwiftyStarRatingView` also works great with Auto Layout, you can use it in StoryBoard or XIB.
90 |
91 |
92 |
93 | ## Contacts
94 |
95 | ####If you wish to contact me, email at: chen.developer@foxmail.com
96 |
97 | #####Sina : [@后知后觉乀](http://weibo.com/2538296781)
98 |
99 | ## License
100 |
101 | SwiftyStarRatingView is released under the [GNU GENERAL PUBLIC LICENSE](LICENSE). See LICENSE for details.
102 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 6.5.5
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_IQKeyboardManagerSwift : NSObject
3 | @end
4 | @implementation PodsDummy_IQKeyboardManagerSwift
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double IQKeyboardManagerSwiftVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char IQKeyboardManagerSwiftVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap:
--------------------------------------------------------------------------------
1 | framework module IQKeyboardManagerSwift {
2 | umbrella header "IQKeyboardManagerSwift-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Foundation" -framework "QuartzCore" -framework "UIKit"
4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/IQKeyboardManagerSwift
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ImagePicker : NSObject
3 | @end
4 | @implementation PodsDummy_ImagePicker
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double ImagePickerVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char ImagePickerVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker.modulemap:
--------------------------------------------------------------------------------
1 | framework module ImagePicker {
2 | umbrella header "ImagePicker-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ImagePicker.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "AVFoundation"
4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ImagePicker
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 | SWIFT_VERSION = 4.0
12 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ImagePicker/ResourceBundle-ImagePicker-ImagePicker-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleIdentifier
8 | ${PRODUCT_BUNDLE_IDENTIFIER}
9 | CFBundleInfoDictionaryVersion
10 | 6.0
11 | CFBundleName
12 | ${PRODUCT_NAME}
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 3.1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZJTableViewDemo_CommentsWithPicture : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZJTableViewDemo_CommentsWithPicture
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks.sh
2 | ${BUILT_PRODUCTS_DIR}/ZJTableViewManager/ZJTableViewManager.framework
3 | ${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework
4 | ${BUILT_PRODUCTS_DIR}/ImagePicker/ImagePicker.framework
5 | ${BUILT_PRODUCTS_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework
6 | ${BUILT_PRODUCTS_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZJTableViewManager.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework
3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImagePicker.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SKPhotoBrowser.framework
5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyStarRatingView.framework
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks.sh
2 | ${BUILT_PRODUCTS_DIR}/ZJTableViewManager/ZJTableViewManager.framework
3 | ${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework
4 | ${BUILT_PRODUCTS_DIR}/ImagePicker/ImagePicker.framework
5 | ${BUILT_PRODUCTS_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework
6 | ${BUILT_PRODUCTS_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZJTableViewManager.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework
3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImagePicker.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SKPhotoBrowser.framework
5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyStarRatingView.framework
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ZJTableViewDemo_CommentsWithPictureVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ZJTableViewDemo_CommentsWithPictureVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker" "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView" "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker/ImagePicker.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker/ImagePicker.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView"
7 | OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "ImagePicker" -framework "QuartzCore" -framework "SKPhotoBrowser" -framework "SwiftyStarRatingView" -framework "UIKit" -framework "ZJTableViewManager"
8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
9 | PODS_BUILD_DIR = ${BUILD_DIR}
10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
12 | PODS_ROOT = ${SRCROOT}/../Pods
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZJTableViewDemo_CommentsWithPicture {
2 | umbrella header "Pods-ZJTableViewDemo-CommentsWithPicture-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-CommentsWithPicture/Pods-ZJTableViewDemo-CommentsWithPicture.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker" "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView" "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker/ImagePicker.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker/ImagePicker.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser/SKPhotoBrowser.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView/SwiftyStarRatingView.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ImagePicker" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView"
7 | OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "ImagePicker" -framework "QuartzCore" -framework "SKPhotoBrowser" -framework "SwiftyStarRatingView" -framework "UIKit" -framework "ZJTableViewManager"
8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
9 | PODS_BUILD_DIR = ${BUILD_DIR}
10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
12 | PODS_ROOT = ${SRCROOT}/../Pods
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## ZJTableViewManager
5 |
6 | Copyright (c) 2018 Javen (https://github.com/JavenZ).
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 | Generated by CocoaPods - https://cocoapods.org
26 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2018 Javen (https://github.com/JavenZ).
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | License
37 | MIT
38 | Title
39 | ZJTableViewManager
40 | Type
41 | PSGroupSpecifier
42 |
43 |
44 | FooterText
45 | Generated by CocoaPods - https://cocoapods.org
46 | Title
47 |
48 | Type
49 | PSGroupSpecifier
50 |
51 |
52 | StringsTable
53 | Acknowledgements
54 | Title
55 | Acknowledgements
56 |
57 |
58 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZJTableViewDemo_Demo2 : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZJTableViewDemo_Demo2
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ZJTableViewDemo_Demo2VersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ZJTableViewDemo_Demo2VersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
7 | OTHER_LDFLAGS = $(inherited) -framework "ZJTableViewManager"
8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
9 | PODS_BUILD_DIR = ${BUILD_DIR}
10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
12 | PODS_ROOT = ${SRCROOT}/../Pods
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZJTableViewDemo_Demo2 {
2 | umbrella header "Pods-ZJTableViewDemo-Demo2-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/Pods-ZJTableViewDemo-Demo2/Pods-ZJTableViewDemo-Demo2.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager/ZJTableViewManager.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager"
7 | OTHER_LDFLAGS = $(inherited) -framework "ZJTableViewManager"
8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
9 | PODS_BUILD_DIR = ${BUILD_DIR}
10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
12 | PODS_ROOT = ${SRCROOT}/../Pods
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 5.0.9
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SKPhotoBrowser : NSObject
3 | @end
4 | @implementation PodsDummy_SKPhotoBrowser
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "SKPhotoBrowser.h"
14 |
15 | FOUNDATION_EXPORT double SKPhotoBrowserVersionNumber;
16 | FOUNDATION_EXPORT const unsigned char SKPhotoBrowserVersionString[];
17 |
18 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser.modulemap:
--------------------------------------------------------------------------------
1 | framework module SKPhotoBrowser {
2 | umbrella header "SKPhotoBrowser-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SKPhotoBrowser/SKPhotoBrowser.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SKPhotoBrowser
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit"
4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SKPhotoBrowser
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 | SWIFT_VERSION = 4.0
12 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.4
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SwiftyStarRatingView : NSObject
3 | @end
4 | @implementation PodsDummy_SwiftyStarRatingView
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double SwiftyStarRatingViewVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char SwiftyStarRatingViewVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView.modulemap:
--------------------------------------------------------------------------------
1 | framework module SwiftyStarRatingView {
2 | umbrella header "SwiftyStarRatingView-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/SwiftyStarRatingView/SwiftyStarRatingView.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStarRatingView
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyStarRatingView
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.3
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ZJTableViewManager : NSObject
3 | @end
4 | @implementation PodsDummy_ZJTableViewManager
5 | @end
6 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double ZJTableViewManagerVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char ZJTableViewManagerVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager.modulemap:
--------------------------------------------------------------------------------
1 | framework module ZJTableViewManager {
2 | umbrella header "ZJTableViewManager-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Other Demo/Pods/Target Support Files/ZJTableViewManager/ZJTableViewManager.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZJTableViewManager
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZJTableViewManager
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ZJTableViewManager/FILE_LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 Javen (https://github.com/JavenZ).
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Other Demo/Pods/ZJTableViewManager/ZJTableViewManager/Core/ZJTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJTableViewManagerCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/2/8.
6 | // Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ZJDefaultCell: UITableViewCell, ZJCellProtocol {
12 | var item: ZJTableViewItem!
13 |
14 | typealias ZJCelltemType = ZJTableViewItem
15 |
16 | func cellWillAppear() {}
17 | }
18 |
--------------------------------------------------------------------------------
/Other Demo/Pods/ZJTableViewManager/ZJTableViewManager/Other/ZJExpandTreeCellItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJExpandTreeCell.swift
3 | // ZJExpandTreeDeme
4 | //
5 | // Created by Javen on 2019/3/19.
6 | // Copyright © 2019 Javen. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class ZJExpandTreeCellItem: ZJTableViewItem {
12 | public var level: Int = 0
13 | public var isExpand = true
14 | public var arrSubLevel = [ZJExpandTreeCellItem]()
15 | /// 展开或者收起下级cell的回调
16 | public var willExpand: ((ZJExpandTreeCellItem) -> Void)?
17 | public weak var superLevelItem: ZJExpandTreeCellItem?
18 |
19 | public override init() {
20 | super.init()
21 | selectionStyle = .none
22 |
23 | setSelectionHandler { (callBackItem: ZJExpandTreeCellItem) in
24 | callBackItem.toggleExpand()
25 | }
26 | }
27 |
28 | public func setSubLevel(item: ZJExpandTreeCellItem, section: ZJTableViewSection) {
29 | arrSubLevel.append(item)
30 | item.superLevelItem = self
31 | item.level = level + 1
32 | if ZJExpandTreeCellItem.checkIfFoldedBySupperLevel(self), isExpand {
33 | section.add(item: item)
34 | }
35 | }
36 |
37 | /// 处理展开事件,返回值是当前cell的状态(展开或者收起)
38 | @discardableResult public func toggleExpand() -> Bool {
39 | var arrItems = [ZJExpandTreeCellItem]()
40 | if isExpand {
41 | // 点击之前是打开的,直接通过递归获取item
42 | ZJExpandTreeCellItem.recursionForItem(self, outItems: &arrItems)
43 | isExpand = !isExpand
44 | } else {
45 | // 点击之前是关闭的,需要先改变isExpand属性(不这么做会导致这一个level下一级的level的cell不显示)
46 | isExpand = !isExpand
47 | ZJExpandTreeCellItem.recursionForItem(self, outItems: &arrItems)
48 | }
49 | willExpand?(self)
50 | if isExpand {
51 | section.insert(arrItems, afterItem: self, animate: .fade)
52 | } else {
53 | section.delete(arrItems, animate: .fade)
54 | }
55 |
56 | return isExpand
57 | }
58 |
59 | /// 递归获取一个item下面所有显示的item
60 | class func recursionForItem(_ item: ZJExpandTreeCellItem, outItems: inout [ZJExpandTreeCellItem]) {
61 | for subItem in item.arrSubLevel {
62 | zj_log(subItem.level)
63 | if item.isExpand == true {
64 | outItems.append(subItem)
65 | if item.arrSubLevel.count != 0 {
66 | recursionForItem(subItem, outItems: &outItems)
67 | }
68 | }
69 | }
70 | }
71 |
72 | // 递归判断一个item是否在某个父节点被折叠
73 | class func checkIfFoldedBySupperLevel(_ item: ZJExpandTreeCellItem) -> Bool {
74 | guard let superItem = item.superLevelItem else {
75 | return item.isExpand
76 | }
77 |
78 | if superItem.isExpand {
79 | return checkIfFoldedBySupperLevel(superItem)
80 | } else {
81 | return false
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Demo2
4 | //
5 | // Created by Javen on 2018/3/14.
6 | // Copyright © 2018年 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/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 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/Category1Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Category1Cell.swift
3 | // Demo2
4 | //
5 | // Created by Javen on 2019/5/14.
6 | // Copyright © 2019 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ZJTableViewManager
11 | class Category1CellItem: ZJTableViewItem {
12 | var title: String!
13 |
14 | }
15 |
16 | class Category1Cell: UITableViewCell, ZJCellProtocol {
17 | var item: Category1CellItem!
18 |
19 | typealias ZJCelltemClass = Category1CellItem
20 |
21 | func cellWillAppear() {
22 | categoryTitle.text = item.title
23 | }
24 |
25 |
26 | @IBOutlet weak var indicatorView: UIView!
27 | @IBOutlet weak var categoryTitle: UILabel!
28 |
29 | override func awakeFromNib() {
30 | super.awakeFromNib()
31 | // Initialization code
32 | }
33 |
34 | override func setSelected(_ selected: Bool, animated: Bool) {
35 | super.setSelected(selected, animated: animated)
36 | if selected {
37 | indicatorView.backgroundColor = UIColor.blue
38 | }else{
39 | indicatorView.backgroundColor = UIColor.lightGray
40 | }
41 |
42 | // Configure the view for the selected state
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/Category2Cell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Category2Cell.swift
3 | // Demo2
4 | //
5 | // Created by Javen on 2019/5/14.
6 | // Copyright © 2019 上海勾芒信息科技. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ZJTableViewManager
11 |
12 | class Category2CellItem: ZJTableViewItem {
13 | var title: String!
14 | }
15 |
16 | class Category2Cell: UITableViewCell, ZJCellProtocol {
17 | var item: Category2CellItem!
18 |
19 | typealias ZJCelltemClass = Category2CellItem
20 |
21 | func cellWillAppear() {
22 | categoryTitle.text = item.title
23 | }
24 |
25 | @IBOutlet weak var categoryTitle: UILabel!
26 |
27 | override func awakeFromNib() {
28 | super.awakeFromNib()
29 | // Initialization code
30 | }
31 |
32 |
33 | override func setSelected(_ selected: Bool, animated: Bool) {
34 | super.setSelected(selected, animated: animated)
35 |
36 | // Configure the view for the selected state
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/Other Demo/ShoppingCartDemo/Demo2/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Other Demo/ZJTableViewDemo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ScreenShot/auto_height.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/ScreenShot/auto_height.jpg
--------------------------------------------------------------------------------
/ScreenShot/forms_shot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/ScreenShot/forms_shot.jpg
--------------------------------------------------------------------------------
/ScreenShot/pictrue_item_read.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/ScreenShot/pictrue_item_read.gif
--------------------------------------------------------------------------------
/ScreenShot/pictureitem_edit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jzhang0480/ZJTableViewManager/64dfdc555f8faad95267e71e8abe7087918407d3/ScreenShot/pictureitem_edit.gif
--------------------------------------------------------------------------------
/ZJTableViewManager.podspec:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 | Pod::Spec.new do |s|
3 | s.name = "ZJTableViewManager"
4 | s.version = "1.0.8"
5 | s.summary = "Powerful data driven content manager for UITableView.强大的数据驱动的TableView"
6 | s.description = <<-DESC
7 | ZJTableViewManager allows to manage the content of any UITableView with ease, both forms and lists. ZJTableViewManager is built on top of reusable cells technique and provides APIs for mapping any object class to any custom cell subclass.
8 | DESC
9 | s.homepage = "https://github.com/JavenZ/ZJTableViewManager"
10 | s.license = { :type => "MIT", :file => "FILE_LICENSE" }
11 | s.author = { "Javen" => "1074472615@qq.com" }
12 | s.source = { :git => "https://github.com/JavenZ/ZJTableViewManager.git", :tag => "#{s.version}" }
13 | # s.source_files = "ZJTableViewManager", "ZJTableViewManager/**/*"
14 | s.platform = :ios, "8.0"
15 | s.swift_version = ['4.0', '4.2', '5.1', '5.2']
16 | # s.source_files = "ZJTableViewManager"
17 | s.subspec "Core" do |ss|
18 | ss.source_files = "ZJTableViewManager/Core/*"
19 | end
20 | s.subspec "Other" do |ss|
21 | ss.source_files = "ZJTableViewManager/Other/*"
22 | ss.dependency 'ZJTableViewManager/Core'
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/ZJTableViewManager/Core/ZJDefaultCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZJDefaultCell.swift
3 | // NewRetail
4 | //
5 | // Created by Javen on 2018/2/8.
6 | // Copyright © 2018年 . All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ZJDefaultCell: UITableViewCell, ZJCellProtocol {
12 | var item: ZJTableViewItem!
13 |
14 | typealias ZJCellItemClass = ZJTableViewItem
15 |
16 | func cellPrepared() {}
17 | }
18 |
--------------------------------------------------------------------------------