Skip to content

Commit bc40e2f

Browse files
committed
[Fix] Append public
1 parent 9891cf7 commit bc40e2f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/SHCoordinator/FlowCoordinator+Utils.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension FlowCoordinator {
2121
/// $0.start()
2222
/// }
2323
/// ```
24-
func set(apply: @escaping (Self) -> Void) {
24+
public func set(apply: @escaping (Self) -> Void) {
2525
apply(self)
2626
}
2727
}
@@ -34,7 +34,7 @@ extension FlowCoordinator {
3434
/// Then, start child coordinator : ]
3535
///
3636
/// - Param with coordinator : parent's child coordinator
37-
func addChild<Coordinator>(with childCoordinator: Coordinator) where Coordinator: FlowCoordinator {
37+
public func addChild<Coordinator>(with childCoordinator: Coordinator) where Coordinator: FlowCoordinator {
3838
childCoordinator.set { [weak self] in
3939
self?.child.append($0)
4040
$0.parent = self
@@ -50,7 +50,7 @@ extension FlowCoordinator {
5050
/// Notes:
5151
/// 1. When a particular ViewController is viewWillDisappeared, it must use this method to remove itself from the child array owned by its parent.
5252
/// Otherwise, the object that handles the child coordinator of the parent coordinator continues to hold unnecessary coordinator instances. If so, a memory leak occurs.
53-
func removeSelf(from parent: FlowCoordinator) {
53+
public func removeSelf(from parent: FlowCoordinator) {
5454
guard let idx = parent.child.firstIndex(where: {$0===self}) else {
5555
print("DEBUG: Delete target \(self) is not available in child coordinators")
5656
return
@@ -59,7 +59,7 @@ extension FlowCoordinator {
5959
parent.child.remove(at: idx)
6060
}
6161

62-
func removeAllChild() {
62+
public func removeAllChild() {
6363
child.removeAll()
6464
}
6565
}
@@ -79,7 +79,7 @@ extension FlowCoordinator {
7979
/// // my coordinator type is some coordinator
8080
/// }
8181
/// ```
82-
func isCoordinator<T: FlowCoordinator>(
82+
public func isCoordinator<T: FlowCoordinator>(
8383
ofType type: T.Type
8484
)-> Bool {
8585
return self is T

Sources/SHCoordinator/FlowCoordinator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#if os(iOS)
99
import UIKit
1010

11-
protocol FlowCoordinator: AnyObject {
11+
public protocol FlowCoordinator: AnyObject {
1212
// MARK: - Properties
1313
var parent: FlowCoordinator! { get set }
1414
var child: [FlowCoordinator] { get set }
@@ -41,7 +41,7 @@ extension FlowCoordinator {
4141
/// }
4242
/// }
4343
/// ```
44-
func finish() {
44+
public func finish() {
4545
guard let parent = parent else {
4646
print("DEBUG: current coordinator is root coordinator")
4747
return

0 commit comments

Comments
 (0)