ss="same-code nl-2 ol-2">
}
}
+
+extension PhotoPreviewViewController: Storyboarded {
+ static func instantiate() -> PhotoPreviewViewController {
+ return UIStoryboard.photoDetail.instantiateViewController(type: PhotoPreviewViewController.self)
+ }
+}
@@ -1,8 +1,8 @@ |
||
| 1 | 1 |
// |
| 2 | 2 |
// ShareViewController.swift |
| 3 |
-// PaiAi |
|
| 3 |
+// Paiai_iOS |
|
| 4 | 4 |
// |
| 5 |
-// Created by zhengjianfei on 16/4/7. |
|
| 5 |
+// Created by FFIB on 16/4/7. |
|
| 6 | 6 |
// Copyright © 2016年 FFIB. All rights reserved. |
| 7 | 7 |
// |
| 8 | 8 |
|
@@ -2,8 +2,8 @@ |
||
| 2 | 2 |
// Paiai_iOS.h |
| 3 | 3 |
// Paiai_iOS |
| 4 | 4 |
// |
| 5 |
-// Created by ffib on 2018/12/19. |
|
| 6 |
-// Copyright © 2018 yb. All rights reserved. |
|
| 5 |
+// Created by FFIB on 2018/12/19. |
|
| 6 |
+// Copyright © 2018 FFIB. All rights reserved. |
|
| 7 | 7 |
// |
| 8 | 8 |
|
| 9 | 9 |
#import <UIKit/UIKit.h> |
@@ -0,0 +1,41 @@ |
||
| 1 |
+// |
|
| 2 |
+// BaseCoordinator.swift |
|
| 3 |
+// Paiai_iOS |
|
| 4 |
+// |
|
| 5 |
+// Created by FFIB on 2019/4/29. |
|
| 6 |
+// Copyright © 2019 FFIB. All rights reserved. |
|
| 7 |
+// |
|
| 8 |
+ |
|
| 9 |
+import RxSwift |
|
| 10 |
+import Foundation |
|
| 11 |
+ |
|
| 12 |
+public class BaseCoordinator<ResultType> {
|
|
| 13 |
+ |
|
| 14 |
+ typealias CoordinationResult = ResultType |
|
| 15 |
+ |
|
| 16 |
+ let disposeBag = DisposeBag() |
|
| 17 |
+ let didCancel = PublishSubject<Void>() |
|
| 18 |
+ |
|
| 19 |
+ private let identifier = UUID() |
|
| 20 |
+ private var childCoordinators = [UUID: Any]() |
|
| 21 |
+ |
|
| 22 |
+ private func store<T>(coordinator: BaseCoordinator<T>) {
|
|
| 23 |
+ childCoordinators[coordinator.identifier] = coordinator |
|
| 24 |
+ } |
|
| 25 |
+ |
|
| 26 |
+ private func free<T>(coordinator: BaseCoordinator<T>) {
|
|
| 27 |
+ childCoordinators[coordinator.identifier] = nil |
|
| 28 |
+ } |
|
| 29 |
+ |
|
| 30 |
+ func coordinate<T>(to coordinator: BaseCoordinator<T>) -> Observable<T> {
|
|
| 31 |
+ store(coordinator: coordinator) |
|
| 32 |
+ return coordinator.start() |
|
| 33 |
+ .do(onNext: { [weak self] _ in
|
|
| 34 |
+ self?.free(coordinator: coordinator) |
|
| 35 |
+ }) |
|
| 36 |
+ } |
|
| 37 |
+ |
|
| 38 |
+ func start() -> Observable<ResultType> {
|
|
| 39 |
+ fatalError("Start method should be implemented.")
|
|
| 40 |
+ } |
|
| 41 |
+} |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 |
// |
| 2 | 2 |
// UIImageView+Kingfisher.swift |
| 3 |
-// PaiAi |
|
| 3 |
+// Paiai_iOS |
|
| 4 | 4 |
// |
| 5 |
-// Created by mac on 16/7/21. |
|
| 5 |
+// Created by FFIB on 16/7/21. |
|
| 6 | 6 |
// Copyright © 2016年 FFIB. All rights reserved. |
| 7 | 7 |
// |
| 8 | 8 |
|
@@ -0,0 +1,11 @@ |
||
| 1 |
+// |
|
| 2 |
+// NavigationSource.swift |
|
| 3 |
+// Paiai_iOS |
|
| 4 |
+// |
|
| 5 |
+// Created by ffib on 2019/5/5. |
|
| 6 |
+// Copyright © 2019 FFIB. All rights reserved. |
|
| 7 |
+// |
|
| 8 |
+ |
|
| 9 |
+import Foundation |
|
| 10 |
+ |
|
| 11 |
+enum NavigationSource {}
|