Skip to content

Commit ca368ae

Browse files
author
JmoVxia
committed
更新README
1 parent 86ad08d commit ca368ae

File tree

103 files changed

+1047
-598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1047
-598
lines changed

CLDemo-OC/CLDemo-OC/Class/CLHomepageController/CLHomepageController.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ - (NSMutableArray *) arrayDS {
118118
[_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"波浪视图", nil) controllerClass:[CLWaveViewController class]]];
119119
[_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"气泡拖拽", nil) controllerClass:[CLBubbleViewController class]]];
120120
[_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"自定义二维码", nil) controllerClass:[CLCustomQRCodeController class]]];
121-
// [_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"气泡弹框", nil) controllerClass:[CLPopoverController class]]];
122-
// [_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"旋转图片", nil) controllerClass:[CLRotatingPictureViewController class]]];
123-
// [_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"日志", nil) controllerClass:[NSLogViewController class]]];
124-
// [_arrayDS addObject: [[CLHomepageModel alloc] initName:NSLocalizedString(@"过渡动画", nil) controllerClass:[CLTransitionViewController class]]];
125121
}
126122
return _arrayDS;
127123
}

CLDemo-Swift/CLDemo-Swift.xcodeproj/project.pbxproj

Lines changed: 68 additions & 52 deletions
Large diffs are not rendered by default.

CLDemo-Swift/CLDemo-Swift.xcodeproj/xcshareddata/xcschemes/CLDemo-Swift.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1250"
3+
LastUpgradeVersion = "1400"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

CLDemo-Swift/CLDemo-Swift/CLTableView/CLCellItemProtocol/CLCellItemProtocol.swift

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//
2+
// CLRowItemProtocol.swift
3+
// CL
4+
//
5+
// Created by JmoVxia on 2020/3/26.
6+
// Copyright © 2020 JmoVxia. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
protocol CLRowItemProtocol where Self: AnyObject {
12+
/// 将要显示cell
13+
var willDisplayCallback: ((IndexPath) -> Void)? { get set }
14+
/// cell显示结束
15+
var didEndDisplayingCallback: ((IndexPath) -> Void)? { get set }
16+
/// cellForRow
17+
var cellForRowCallback: ((IndexPath) -> Void)? { get set }
18+
/// 点击cell回调
19+
var didSelectCellCallback: ((IndexPath) -> Void)? { get set }
20+
/// cell类型
21+
func cellClass() -> UITableViewCell.Type
22+
/// 高度
23+
func cellHeight() -> CGFloat
24+
}
25+
26+
extension CLRowItemProtocol {
27+
var willDisplayCallback: ((IndexPath) -> Void)? {
28+
get {
29+
return nil
30+
}
31+
set {}
32+
}
33+
34+
var didEndDisplayingCallback: ((IndexPath) -> Void)? {
35+
get {
36+
return nil
37+
}
38+
set {}
39+
}
40+
41+
var cellForRowCallback: ((IndexPath) -> Void)? {
42+
get {
43+
return nil
44+
}
45+
set {}
46+
}
47+
48+
var didSelectCellCallback: ((IndexPath) -> Void)? {
49+
get {
50+
return nil
51+
}
52+
set {}
53+
}
54+
55+
/// 高度
56+
func cellHeight() -> CGFloat {
57+
return UITableView.automaticDimension
58+
}
59+
}

CLDemo-Swift/CLDemo-Swift/CLTableView/CLCellProtocol/CLCellProtocol.swift renamed to CLDemo-Swift/CLDemo-Swift/CLTableView/CLItemProtocol/CLRowProtocol.swift

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// CLCellProtocol.swift
2+
// CKDCellProtocol.swift
33
// CL
44
//
55
// Created by JmoVxia on 2020/3/26.
@@ -8,28 +8,25 @@
88

99
import UIKit
1010

11-
12-
1311
protocol CLCellBaseProtocol {
14-
func setCellItem(_ item: CLCellItemProtocol, indexPath: IndexPath)
12+
func set(item: CLRowItemProtocol, indexPath: IndexPath)
1513
}
1614

17-
protocol CLCellProtocol: CLCellBaseProtocol where Self: UITableViewCell {
18-
associatedtype T: CLCellItemProtocol
19-
20-
var item: T? { set get }
21-
15+
protocol CLRowProtocol: CLCellBaseProtocol where Self: UITableViewCell {
16+
associatedtype T: CLRowItemProtocol
17+
var item: T? { get set }
2218
func setItem(_ item: T, indexPath: IndexPath)
2319
}
24-
extension CLCellProtocol {
20+
21+
extension CLRowProtocol {
2522
var item: T? {
26-
set {
27-
}
2823
get {
2924
return nil
3025
}
26+
set {}
3127
}
32-
func setCellItem(_ item: CLCellItemProtocol, indexPath: IndexPath) {
28+
29+
func set(item: CLRowItemProtocol, indexPath: IndexPath) {
3330
guard let item = item as? Self.T else { return }
3431
self.item = item
3532
setItem(item, indexPath: indexPath)
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
//
2+
// CKDCellHeaderFooterItemProtocol.swift
3+
// CKDDoctor
4+
//
5+
// Created by Chen JmoVxia on 2022/6/15.
6+
//
7+
8+
import Foundation
9+
10+
protocol CLSectionItemProtocol {
11+
var rows: [CLRowItemProtocol] { get set }
12+
13+
var willDisplayHeaderViewCallback: ((Int) -> Void)? { get set }
14+
var didEndDisplayingHeaderViewCallback: ((Int) -> Void)? { get set }
15+
var viewForHeaderInSectionCallback: ((Int) -> Void)? { get set }
16+
var didSelectHeaderViewCallback: ((Int) -> Void)? { get set }
17+
func headerHeight() -> CGFloat
18+
func headerClass() -> UITableViewHeaderFooterView.Type?
19+
20+
var willDisplayFooterViewCallback: ((Int) -> Void)? { get set }
21+
var didEndDisplayingFooterViewCallback: ((Int) -> Void)? { get set }
22+
var viewForFooterInSectionCallback: ((Int) -> Void)? { get set }
23+
var didSelectFooterViewCallback: ((Int) -> Void)? { get set }
24+
func footerHeight() -> CGFloat
25+
func footerClass() -> UITableViewHeaderFooterView.Type?
26+
}
27+
28+
extension CLSectionItemProtocol {
29+
var willDisplayHeaderViewCallback: ((Int) -> Void)? {
30+
get {
31+
nil
32+
}
33+
set {}
34+
}
35+
36+
var didEndDisplayingHeaderViewCallback: ((Int) -> Void)? {
37+
get {
38+
nil
39+
}
40+
set {}
41+
}
42+
43+
var viewForHeaderInSectionCallback: ((Int) -> Void)? {
44+
get {
45+
nil
46+
}
47+
set {}
48+
}
49+
50+
var didSelectHeaderViewCallback: ((Int) -> Void)? {
51+
get {
52+
nil
53+
}
54+
set {}
55+
}
56+
57+
func headerHeight() -> CGFloat {
58+
UITableView.automaticDimension
59+
}
60+
61+
func headerClass() -> UITableViewHeaderFooterView.Type? {
62+
nil
63+
}
64+
65+
var willDisplayFooterViewCallback: ((Int) -> Void)? {
66+
get {
67+
nil
68+
}
69+
set {}
70+
}
71+
72+
var didEndDisplayingFooterViewCallback: ((Int) -> Void)? {
73+
get {
74+
nil
75+
}
76+
set {}
77+
}
78+
79+
var viewForFooterInSectionCallback: ((Int) -> Void)? {
80+
get {
81+
nil
82+
}
83+
set {}
84+
}
85+
86+
var didSelectFooterViewCallback: ((Int) -> Void)? {
87+
get {
88+
nil
89+
}
90+
set {}
91+
}
92+
93+
func footerHeight() -> CGFloat {
94+
UITableView.automaticDimension
95+
}
96+
97+
func footerClass() -> UITableViewHeaderFooterView.Type? {
98+
nil
99+
}
100+
}
101+
102+
extension CLSectionItemProtocol {
103+
var rows: [CLRowItemProtocol] {
104+
get {
105+
[]
106+
}
107+
set {}
108+
}
109+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// CKDSectionProtocol.swift
3+
// CKDDoctor
4+
//
5+
// Created by Chen JmoVxia on 2022/6/15.
6+
//
7+
8+
import Foundation
9+
10+
protocol CLSectionBaseProtocol {
11+
func set(item: CLSectionItemProtocol, section: Int)
12+
}
13+
14+
protocol CLSectionProtocol: CLSectionBaseProtocol where Self: UITableViewHeaderFooterView {
15+
associatedtype T: CLSectionItemProtocol
16+
var item: T? { get set }
17+
func setItem(_ item: T, section: Int)
18+
}
19+
20+
extension CLSectionProtocol {
21+
var item: T? {
22+
get {
23+
return nil
24+
}
25+
set {}
26+
}
27+
28+
func set(item: CLSectionItemProtocol, section: Int) {
29+
guard let item = item as? Self.T else { return }
30+
self.item = item
31+
setItem(item, section: section)
32+
}
33+
}

0 commit comments

Comments
 (0)