Skip to content

Commit c6a98ef

Browse files
author
son.le
committed
add Carbon source code inside project to avoid duplicate name with ios framework
1 parent bacf109 commit c6a98ef

Some content is hidden

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

42 files changed

+3336
-22
lines changed

Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use_frameworks!
44
workspace 'RxSwiftUIKit.xcworkspace'
55

66
def dependencyPod
7-
pod 'Carbon', '1.0.0-rc.6'
87
pod 'RxSwift'
98
pod 'RxCocoa'
109
pod 'SwiftUIKit_pro', '1.0.0'
10+
pod 'DifferenceKit/Core', '~> 1.1'
1111
end
1212

1313

Podfile.lock

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
PODS:
2-
- Carbon (1.0.0-rc.6):
3-
- DifferenceKit/Core (~> 1.1)
42
- DifferenceKit/Core (1.2.0)
53
- RxCocoa (6.1.0):
64
- RxRelay (= 6.1.0)
@@ -13,28 +11,26 @@ PODS:
1311
- SwiftUIKit_pro/Core (1.0.0)
1412

1513
DEPENDENCIES:
16-
- Carbon (= 1.0.0-rc.6)
14+
- DifferenceKit/Core (~> 1.1)
1715
- RxCocoa
1816
- RxSwift
1917
- SwiftUIKit_pro (= 1.0.0)
2018

2119
SPEC REPOS:
2220
trunk:
23-
- Carbon
2421
- DifferenceKit
2522
- RxCocoa
2623
- RxRelay
2724
- RxSwift
2825
- SwiftUIKit_pro
2926

3027
SPEC CHECKSUMS:
31-
Carbon: 84c3402754e682960ef85dd20a2fe44c723701d2
3228
DifferenceKit: 5659c430bb7fe45876fa32ce5cba5d6167f0c805
3329
RxCocoa: 5c51f02d562cbd94629f6c26cf0c80fe4ab8d343
3430
RxRelay: 483e1a19fad961b41f0b0c0bee506f46c1ae14fe
3531
RxSwift: a834e5c538e89eca0cae86f403f4fbf0336786ce
3632
SwiftUIKit_pro: b3bcc6888f7840db0d53f0881e367401603d1290
3733

38-
PODFILE CHECKSUM: 7a8482d6455c2f0f65ea7543835f0ffe00e66e9c
34+
PODFILE CHECKSUM: 71849ae711ce21950b8d7425768c94c616f23ee4
3935

4036
COCOAPODS: 1.10.1

RxSwiftUIKit-Example/RxSwiftUIKit-Example/Views/GridGameVC.swift

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import RxSwiftUIKit
1111
import SwiftUIKit_pro
1212
import RxSwift
1313
import RxCocoa
14-
import Carbon
1514

1615
class GridGame: UI.ViewController {
1716

RxSwiftUIKit-Example/RxSwiftUIKit-Example/Views/TreeVC.swift

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import RxSwiftUIKit
1111
import SwiftUIKit_pro
1212
import RxSwift
1313
import RxCocoa
14-
import Carbon
1514

1615
class TreeVC: UI.ViewController {
1716

RxSwiftUIKit-Example/RxSwiftUIKit-Example/Views/ViewController.swift

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import RxSwiftUIKit
1111
import SwiftUIKit_pro
1212
import RxSwift
1313
import RxCocoa
14-
import Carbon
1514

1615
class ViewController: UI.ViewController {
1716

RxSwiftUIKit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Pod::Spec.new do |spec|
4141

4242
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
4343

44-
spec.dependency 'Carbon', '1.0.0-rc.6'
44+
spec.dependency 'DifferenceKit/Core', "~> 1.1"
4545
spec.dependency 'RxSwift', '~> 6.1'
4646
spec.dependency 'RxCocoa', '~> 6.1'
4747
spec.dependency 'SwiftUIKit_pro', '1.0.0'

RxSwiftUIKit.xcodeproj/project.pbxproj

+200
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import Foundation
2+
3+
/// Represents an adapter that holds data to be rendered.
4+
public protocol Adapter: class {
5+
/// The data to be rendered.
6+
var data: [Section] { get set }
7+
}
8+
9+
public extension Adapter {
10+
/// Returns a collection of cell nodes in the specified section.
11+
///
12+
/// - Parameter:
13+
/// - section: The index of section containing the collection of
14+
/// cell nodes to retrieve.
15+
///
16+
/// - Returns: A collection of cell nodes in the specified section.
17+
func cellNodes(in section: Int) -> [CellNode] {
18+
return data[section].cells
19+
}
20+
21+
/// Returns a node of cell at the specified index path.
22+
///
23+
/// - Parameter:
24+
/// - indexPath: The index path at the cell node to retrieve.
25+
///
26+
/// - Returns: A node of cell at the specified index path.
27+
func cellNode(at indexPath: IndexPath) -> CellNode {
28+
return cellNodes(in: indexPath.section)[indexPath.row]
29+
}
30+
31+
/// Returns a node of header in the specified section.
32+
///
33+
/// - Parameter:
34+
/// - section: The index of section containing the header node
35+
/// to retrive.
36+
///
37+
/// - Returns: A node of header in the specified section.
38+
func headerNode(in section: Int) -> ViewNode? {
39+
return data[section].header
40+
}
41+
42+
/// Returns a node of footer in the specified section.
43+
///
44+
/// - Parameter:
45+
/// - section: The index of section containing the footer node
46+
/// to retrive.
47+
///
48+
/// - Returns: A node of footer in the specified section.
49+
func footerNode(in section: Int) -> ViewNode? {
50+
return data[section].footer
51+
}
52+
}

0 commit comments

Comments
 (0)