5cad4adbfa95d30fd881db64a225eR50">50
}
return nil
}
-
- func getNavigationBarBounds() -> CGRect {
- let statusHeight = UIApplication.shared.statusBarFrame.height
- return CGRect(x: 0, y: -statusHeight, width: bounds.width, height: bounds.height + statusHeight)
+
+ internal func apply(for configure: NavigationBarConfiguration) {
+ isHidden = configure.isHidden
+ isTranslucent = configure.isTranslucent
+
+ barStyle = configure.barStyle
+ shadowImage = configure.shadowImage
+ setBackgroundImage(configure.backgroundImage, for: .default)
}
-
- override func value(forUndefinedKey key: String) -> Any? {
- return nil
+
+ internal convenience init(configure: NavigationBarConfiguration) {
+ self.init()
+ apply(for: configure)
}
}
-/// NavigationBar transition
-extension NavigationBar {
- func constructViewHierarchy() {
- setupShadowView()
- setupBackgroundImageView()
-
- guard let barBackground = getBarBackground() else { return }
-
- insertSubview(shadowImageView, aboveSubview: barBackground)
- insertSubview(backgroundImageView, aboveSubview: barBackground)
- insertSubview(fakeView, belowSubview: backgroundImageView)
- layoutIfNeeded()
- }
-
- private func setupShadowView() {
- if let image = originShadowImage, image.size == CGSize.zero {
- shadowImageView.image = image
- } else {
- shadowImageView.backgroundColor = UIColor(red: 0, green: 0, blue: 0,
- alpha: 77.0 / 255)
- }
-
- shadowImageView.alpha = originShadowImage == nil ? 1 : 0
- getShadowView()?.isHidden = true
- }
-
- private func setupBackgroundImageView() {
- if isPush {
- fakeView.alpha = 0
- backgroundImageView.image = targetBgImage
- } else {
- setBackgroundImage()
- fakeView.alpha = 1
- backgroundImageView.image = currBgImage
- }
- }
-
- /// interactivePopGestureRecognizer
- func transitionAnimationWithPercent(_ percent: CGFloat) {
- switch bounce {
- case .forward, .none:
- transitionShadowAnimationWithPercent(percent)
- transitionBackgroundAnimationWithPercent(percent)
- case .backward:
- transitionShadowAnimationWithPercent(1 - percent)
- transitionBackgroundAnimationWithPercent(1 - percent)
- }
- }
-
- func transitionAnimation() {
- transitionShadowAnimation()
- transitionBackgroundAnimation()
- }
-
- private func transitionShadowAnimation() {
- guard hasChangedShadow else { return }
- shadowImageView.alpha = originShadowImage == nil ? 0 : 1
-// if originShadowImage == nil {
-// shadowImageView.alpha = isInteractive ? (1 - percent) * 1 : 0
-// } else {
-// shadowImageView.alpha = isInteractive ? percent * 1 : 1
-// }
+public extension UIToolbar {
+ func getBarBackground() -> UIView? {
+ return value(forKeyPath: "_backgroundView") as? UIView
}
-
- private func transitionBackgroundAnimation() {
- guard hasChangedBgImage else { return }
- if isPush {
- fakeView.alpha = 1
- backgroundImageView.frame.origin.x = 0
- } else {
- fakeView.alpha = 0
- backgroundImageView.frame.origin.x = bounds.width
+
+ func getShadowView() -> UIView? {
+ guard let barBackground = getBarBackground() else { return nil }
+ for view in barBackground.subviews where view.bounds.height == 0.5 {
+ return view
}
+ return nil
}
-
- private func transitionShadowAnimationWithPercent(_ percent: CGFloat) {
- guard hasChangedShadow else { return }
- shadowImageView.alpha = originShadowImage == nil ? (1 - percent) * 1 : percent * 1
- }
-
- private func transitionBackgroundAnimationWithPercent(_ percent: CGFloat) {
- guard hasChangedBgImage else { return }
- fakeView.alpha = (1 - percent) * 1
- backgroundImageView.frame.origin.x = percent * bounds.width
- }
-
- func clear() {
-
- if isPush && hasChangedBgImage { setBackgroundImage() }
-
- if !isPush && bounce == .backward && hasChangedBgImage {
- targetBgImage = currBgImage
- setBackgroundImage()
- }
-
- getShadowView()?.isHidden = false
-
- fakeView.removeFromSuperview()
- shadowImageView.removeFromSuperview()
- backgroundImageView.removeFromSuperview()
-
- currBgImage = nil
- targetBgImage = nil
-
- hasChangedBgImage = false
- hasChangedShadow = false
-
- bounce = .none
+
+ internal convenience init(configure: NavigationBarConfiguration) {
+ self.init()
+ isHidden = configure.isHidden
+ isTranslucent = configure.isTranslucent
+
+ barStyle = configure.barStyle
+ setShadowImage(configure.shadowImage, forToolbarPosition: .any)
+ setBackgroundImage(configure.backgroundImage, forToolbarPosition: .any, barMetrics: .default)
}
}
-extension NavigationBar {
- enum Bounce {
- case none
- case backward
- case forward
+extension UIViewController {
+ internal func getFakeBarFrame(for navigationBar: UINavigationBar) -> CGRect? {
+ guard let backgroundView = navigationBar.getBarBackground(),
+ var frame = backgroundView.superview?.convert(backgroundView.frame, to: self.view)
+ else { return nil }
+
+ frame.origin.x = self.view.bounds.origin.x
+ return frame
}
}
@@ -0,0 +1,50 @@ |
||
1 |
+// |
|
2 |
+// NavigationBarConfiguration.swift |
|
3 |
+// PaiaiUIKit |
|
4 |
+// |
|
5 |
+// Created by ffib on 2019/5/8. |
|
6 |
+// Copyright © 2019 FFIB. All rights reserved. |
|
7 |
+// |
|
8 |
+ |
|
9 |
+import UIKit |
|
10 |
+ |
|
11 |
+struct NavigationBarConfiguration { |
|
12 |
+ var isHidden: Bool |
|
13 |
+ var isTranslucent: Bool |
|
14 |
+ |
|
15 |
+ var barStyle: UIBarStyle |
|
16 |
+ var shadowImage: UIImage? |
|
17 |
+ var backgroundImage: UIImage? |
|
18 |
+ |
|
19 |
+ static var `default`: NavigationBarConfiguration { |
|
20 |
+ return NavigationBarConfiguration() |
|
21 |
+ } |
|
22 |
+ |
|
23 |
+ static var transparent: NavigationBarConfiguration { |
|
24 |
+ return NavigationBarConfiguration(isHidden: false, isTranslucent: true, |
|
25 |
+ shadowImage: UIImage(), backgroundImage: UIImage()) |
|
26 |
+ } |
|
27 |
+ |
|
28 |
+ init(isHidden: Bool = false, |
|
29 |
+ isTranslucent: Bool = false, |
|
30 |
+ tintColor: UIColor = .black, |
|
31 |
+ shadowImage: UIImage? = nil, |
|
32 |
+ barTintColor: UIColor? = nil, |
|
33 |
+ backgroundImage: UIImage? = nil, |
|
34 |
+ barStyle: UIBarStyle = .default, |
|
35 |
+ titleTextAttributes: [NSAttributedString.Key: Any] = [:]) { |
|
36 |
+ self.isHidden = isHidden |
|
37 |
+ self.barStyle = barStyle |
|
38 |
+ self.shadowImage = shadowImage |
|
39 |
+ self.isTranslucent = isTranslucent |
|
40 |
+ self.backgroundImage = backgroundImage |
|
41 |
+ } |
|
42 |
+ |
|
43 |
+ init(navigationBar: UINavigationBar) { |
|
44 |
+ isHidden = navigationBar.isHidden |
|
45 |
+ barStyle = navigationBar.barStyle |
|
46 |
+ shadowImage = navigationBar.shadowImage |
|
47 |
+ isTranslucent = navigationBar.isTranslucent |
|
48 |
+ backgroundImage = navigationBar.backgroundImage(for: .default) |
|
49 |
+ } |
|
50 |
+} |
@@ -9,7 +9,13 @@ |
||
9 | 9 |
import UIKit |
10 | 10 |
|
11 | 11 |
public class NavigationController: UINavigationController { |
12 |
- |
|
12 |
+ |
|
13 |
+ private var operation: Operation = .none |
|
14 |
+ private var barConfigures: [UIViewController?: NavigationBarConfiguration] = [:] |
|
15 |
+ |
|
16 |
+ private var _fromFakeBar = UIToolbar() |
|
17 |
+ private var _toFakeBar = UIToolbar() |
|
18 |
+ |
|
13 | 19 |
override public init(rootViewController: UIViewController) { |
14 | 20 |
super.init(navigationBarClass: NavigationBar.classForCoder(), toolbarClass: nil) |
15 | 21 |
self.viewControllers = [rootViewController] |
@@ -28,41 +34,67 @@ public class NavigationController: UINavigationController { |
||
28 | 34 |
delegate = self |
29 | 35 |
interactivePopGestureRecognizer?.delegate = self |
30 | 36 |
interactivePopGestureRecognizer?.isEnabled = true |
31 |
- |
|
32 |
- interactivePopGestureRecognizer?.addTarget(self, |
|
33 |
- action: #selector(handlePop(gestureRecognizer:))) |
|
34 | 37 |
} |
38 |
+ |
|
39 |
+ public override func viewDidLayoutSubviews() { |
|
40 |
+ super.viewDidLayoutSubviews() |
|
41 |
+ if operation == .none { return } |
|
42 |
+ navigationBar.getBarBackground()?.alpha = 0 |
|
43 |
+ } |
|
44 |
+} |
|
35 | 45 |
|
36 |
- @objc |
|
37 |
- private func handlePop(gestureRecognizer: UIPanGestureRecognizer) { |
|
38 |
- guard let navBar = navigationBar as? NavigationBar else { return } |
|
39 |
- if gestureRecognizer.state == .began { navBar.isPush = false } |
|
40 |
- |
|
41 |
- guard navBar.needsInteractive else { return } |
|
42 |
- |
|
43 |
- let percent = gestureRecognizer.translation(in: view).x / view.bounds.width |
|
44 |
- |
|
45 |
- if gestureRecognizer.state == .began || gestureRecognizer.state == .changed { |
|
46 |
- navBar.transitionAnimationWithPercent(percent) |
|
46 |
+fileprivate extension NavigationController { |
|
47 |
+ |
|
48 |
+ func setFakeNavigationBar() { |
|
49 |
+ UIView.setAnimationsEnabled(false) |
|
50 |
+ guard let to = transitionCoordinator?.viewController(forKey: .to), |
|
51 |
+ let from = transitionCoordinator?.viewController(forKey: .from) else { return } |
|
52 |
+ |
|
53 |
+ switch self.operation { |
|
54 |
+ case .push: |
|
55 |
+ barConfigures[to] = NavigationBarConfiguration(navigationBar: navigationBar) |
|
56 |
+ case .pop: |
|
57 |
+ navigationBar.setBackgroundImage(barConfigures[to]?.backgroundImage, for: .default) |
|
58 |
+ default: |
|
59 |
+ break |
|
47 | 60 |
} |
61 |
+ |
|
62 |
+ setToFakeNavigationBar(for: to) |
|
63 |
+ setFromFakeNavigationBar(for: from) |
|
64 |
+ |
|
65 |
+ navigationBar.apply(for: .transparent) |
|
66 |
+ UIView.setAnimationsEnabled(true) |
|
67 |
+ |
|
68 |
+ if barConfigures[to]?.isHidden != barConfigures[from]?.isHidden { |
|
69 |
+ setNavigationBarHidden(barConfigures[to]?.isHidden ?? false, animated: true) |
|
70 |
+ } |
|
71 |
+ } |
|
48 | 72 |
|
49 |
- guard gestureRecognizer.state == .ended |
|
50 |
- || gestureRecognizer.state == .cancelled |
|
51 |
- || gestureRecognizer.state == .failed, |
|
52 |
- let coordinator = transitionCoordinator else { return } |
|
53 |
- |
|
54 |
- navBar.bounce = percent < 0.5 ? .backward : .forward |
|
55 |
- let durationPercent = Double(percent < 0.5 ? coordinator.percentComplete : (1 - coordinator.percentComplete)) |
|
56 |
- UIView.animate(withDuration: coordinator.transitionDuration * durationPercent, |
|
57 |
- delay: 0, |
|
58 |
- usingSpringWithDamping: 1, |
|
59 |
- initialSpringVelocity: coordinator.completionVelocity, |
|
60 |
- options: [], |
|
61 |
- animations: { |
|
62 |
- navBar.transitionAnimationWithPercent(1) |
|
63 |
- }, completion: { _ in |
|
64 |
- navBar.clear() |
|
65 |
- }) |
|
73 |
+ func setFromFakeNavigationBar(for from: UIViewController) { |
|
74 |
+ if let navBarFrame = from.getFakeBarFrame(for: navigationBar) { |
|
75 |
+ _fromFakeBar = UIToolbar(configure: barConfigures[from] ?? .default) |
|
76 |
+ _fromFakeBar.delegate = self |
|
77 |
+ _fromFakeBar.frame = navBarFrame |
|
78 |
+ from.view.addSubview(_fromFakeBar) |
|
79 |
+ } |
|
80 |
+ } |
|
81 |
+ |
|
82 |
+ func setToFakeNavigationBar(for to: UIViewController) { |
|
83 |
+ if let navBarFrame = to.getFakeBarFrame(for: navigationBar) { |
|
84 |
+ _toFakeBar = UIToolbar(configure: barConfigures[to] ?? .default) |
|
85 |
+ _toFakeBar.delegate = self |
|
86 |
+ _toFakeBar.frame = navBarFrame |
|
87 |
+ to.view.addSubview(_toFakeBar) |
|
88 |
+ } |
|
89 |
+ } |
|
90 |
+ |
|
91 |
+ func clearFake() { |
|
92 |
+ _fromFakeBar.removeFromSuperview() |
|
93 |
+ _toFakeBar.removeFromSuperview() |
|
94 |
+ |
|
95 |
+ guard let from = transitionCoordinator?.viewController(forKey: .from), |
|
96 |
+ operation == .pop else { return } |
|
97 |
+ barConfigures.removeValue(forKey: from) |
|
66 | 98 |
} |
67 | 99 |
} |
68 | 100 |
|
@@ -72,37 +104,34 @@ extension NavigationController: UINavigationControllerDelegate { |
||
72 | 104 |
animationControllerFor operation: UINavigationController.Operation, |
73 | 105 |
from fromVC: UIViewController, |
74 | 106 |
to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { |
75 |
- (navigationBar as? NavigationBar)?.isPush = operation == .push |
|
107 |
+ self.operation = operation |
|
76 | 108 |
return nil |
77 | 109 |
} |
78 | 110 |
|
79 | 111 |
public func navigationController(_ navigationController: UINavigationController, |
80 | 112 |
willShow viewController: UIViewController, |
81 | 113 |
animated: Bool) { |
82 |
- guard let navBar = navigationBar as? NavigationBar, |
|
83 |
- navBar.needsInteractive else { return } |
|
84 |
- |
|
85 |
- guard let coordinator = transitionCoordinator, |
|
86 |
- animated else { |
|
87 |
- navBar.setBackgroundImage() |
|
88 |
- navBar.clear() |
|
89 |
- return |
|
114 |
+ if operation == .none { |
|
115 |
+ self.barConfigures[viewController] = NavigationBarConfiguration(navigationBar: navigationBar) |
|
116 |
+ return |
|
90 | 117 |
} |
91 |
- |
|
92 |
- navBar.constructViewHierarchy() |
|
93 |
- |
|
94 |
- guard !coordinator.isInteractive else { return } |
|
95 |
- |
|
96 |
- coordinator.animate(alongsideTransition: { (transitionContext) in |
|
97 |
- DispatchQueue.main.async { |
|
98 |
- UIView.beginAnimations(nil, context: nil) |
|
99 |
- UIView.setAnimationCurve(transitionContext.completionCurve) |
|
100 |
- UIView.setAnimationDuration(transitionContext.transitionDuration) |
|
101 |
- navBar.transitionAnimation() |
|
102 |
- UIView.commitAnimations() |
|
118 |
+ |
|
119 |
+ transitionCoordinator?.animate(alongsideTransition: { context in |
|
120 |
+ if context.isInteractive { |
|
121 |
+ self.operation = .pop |
|
122 |
+ } |
|
123 |
+ self.setFakeNavigationBar() |
|
124 |
+ }, completion: { context in |
|
125 |
+ let vc: UIViewController? |
|
126 |
+ if context.isCancelled { |
|
127 |
+ self.operation = .push |
|
128 |
+ vc = context.viewController(forKey: .from) |
|
129 |
+ } else { |
|
130 |
+ vc = context.viewController(forKey: .to) |
|
103 | 131 |
} |
104 |
- }, completion: { (_) in |
|
105 |
- navBar.clear() |
|
132 |
+ self.navigationBar.getBarBackground()?.alpha = 1 |
|
133 |
+ self.navigationBar.apply(for: self.barConfigures[vc] ?? .default) |
|
134 |
+ self.clearFake() |
|
106 | 135 |
}) |
107 | 136 |
} |
108 | 137 |
} |
@@ -115,3 +144,9 @@ extension NavigationController: UIGestureRecognizerDelegate { |
||
115 | 144 |
return true |
116 | 145 |
} |
117 | 146 |
} |
147 |
+ |
|
148 |
+extension NavigationController: UIToolbarDelegate { |
|
149 |
+ public func position(for bar: UIBarPositioning) -> UIBarPosition { |
|
150 |
+ return .top |
|
151 |
+ } |
|
152 |
+} |
@@ -69,7 +69,9 @@ open class PageViewController: UIViewController { |
||
69 | 69 |
contentRect = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) |
70 | 70 |
|
71 | 71 |
if #available(iOS 11, *) { |
72 |
- scrollView.contentInsetAdjustmentBehavior = .never |
|
72 |
+ scrollView.contentInsetAdjustmentBehavior = .automatic |
|
73 |
+ } else { |
|
74 |
+ automaticallyAdjustsScrollViewInsets = false |
|
73 | 75 |
} |
74 | 76 |
|
75 | 77 |
constructViewHierarchy() |
@@ -82,14 +82,15 @@ import CoreImage |
||
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
@objc func start() { |
85 |
- let queue = DispatchQueue(label: "FFIB.startScan.com") |
|
86 |
- queue.async { |
|
87 |
- self.qrscanner?.startScan() |
|
85 |
+// let queue = DispatchQueue(label: "FFIB.startScan.com") |
|
86 |
+// queue.async { |
|
87 |
+ |
|
88 | 88 |
DispatchQueue.main.async { |
89 |
+ self.qrscanner?.startScan() |
|
89 | 90 |
self.qrmaskView?.startAnimation() |
90 | 91 |
self.indicatorView.stopAnimating() |
91 | 92 |
} |
92 |
- } |
|
93 |
+// } |
|
93 | 94 |
} |
94 | 95 |
|
95 | 96 |
public func openLight() { |
@@ -83,7 +83,7 @@ class QRCodeScanner: NSObject { |
||
83 | 83 |
} |
84 | 84 |
func startScan() { |
85 | 85 |
setScanArea() |
86 |
- captureSession.startRunning() |
|
86 |
+// captureSession.startRunning() |
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
func stopScan() { |
@@ -70,11 +70,13 @@ fileprivate extension AppCoordinator { |
||
70 | 70 |
|
71 | 71 |
let homeCoordinator = HomeCoordinator(homeVC, |
72 | 72 |
navigationController: navigationController, |
73 |
+ containerViewController: containerViewController, |
|
73 | 74 |
userInfoViewModel: shareUserInfoViewModel) |
74 | 75 |
coordinate(to: homeCoordinator).subscribe().disposed(by: disposeBag) |
75 | 76 |
|
76 | 77 |
let messageCoordinator = MessageCoordinator(messageVC, |
77 |
- navigationController: navigationController) |
|
78 |
+ navigationController: navigationController, |
|
79 |
+ containerViewController: containerViewController) |
|
78 | 80 |
coordinate(to: messageCoordinator).subscribe().disposed(by: disposeBag) |
79 | 81 |
|
80 | 82 |
containerViewController.pageItems = [PageItem(title: "首页", |
@@ -61,6 +61,7 @@ public final class ContainerViewController: PageViewController { |
||
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
func setupNavigationBar() { |
64 |
+ navigationController?.navigationBar.isTranslucent = true |
|
64 | 65 |
navigationController?.navigationBar.shadowImage = UIImage() |
65 | 66 |
navigationController?.navigationBar.tintColor = UIColor.white |
66 | 67 |
navigationController?.navigationBar.barTintColor = UIColor.white |
@@ -52,10 +52,10 @@ final class GroupViewController: UIViewController { |
||
52 | 52 |
override func viewDidLoad() { |
53 | 53 |
super.viewDidLoad() |
54 | 54 |
initalize() |
55 |
+ navigationController?.navigationBar.setBackgroundImage(UIImage.Navigation.background, for: .default) |
|
55 | 56 |
} |
56 | 57 |
|
57 | 58 |
override func viewWillAppear(_ animated: Bool) { |
58 |
- navigationController?.navigationBar.setBackgroundImage(UIImage.Navigation.background, for: .default) |
|
59 | 59 |
super.viewWillAppear(animated) |
60 | 60 |
} |
61 | 61 |
|
@@ -82,7 +82,7 @@ final class GroupViewController: UIViewController { |
||
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
deinit { |
85 |
- collectionView.endAllRefreshing() |
|
85 |
+ collectionView.removeAllPullToRefresh() |
|
86 | 86 |
} |
87 | 87 |
} |
88 | 88 |
|
@@ -13,14 +13,16 @@ import PaiaiDataKit |
||
13 | 13 |
class HomeCoordinator: BaseCoordinator<Void> { |
14 | 14 |
|
15 | 15 |
var homeViewController: HomeViewController |
16 |
+ var containerViewController: ContainerViewController |
|
16 | 17 |
var shareUserInfoViewModel: UserInfoViewModel |
17 | 18 |
|
18 | 19 |
init(_ viewController: HomeViewController, |
19 | 20 |
navigationController: UINavigationController, |
21 |
+ containerViewController: ContainerViewController, |
|
20 | 22 |
userInfoViewModel: UserInfoViewModel) { |
21 | 23 |
self.homeViewController = viewController |
22 | 24 |
self.shareUserInfoViewModel = userInfoViewModel |
23 |
- |
|
25 |
+ self.containerViewController = containerViewController |
|
24 | 26 |
super.init(navigationController: navigationController, viewController: viewController) |
25 | 27 |
} |
26 | 28 |
|
@@ -36,7 +36,7 @@ final class HomeViewController: UIViewController { |
||
36 | 36 |
collectionView.register(UINib(nibName: "PhotoCell", |
37 | 37 |
bundle: Bundle(identifier: "com.Paiai-iOS")), |
38 | 38 |
forCellWithReuseIdentifier: "photoCell") |
39 |
- |
|
39 |
+ |
|
40 | 40 |
setup() |
41 | 41 |
binding() |
42 | 42 |
} |
@@ -62,7 +62,7 @@ final class HomeViewController: UIViewController { |
||
62 | 62 |
} |
63 | 63 |
|
64 | 64 |
deinit { |
65 |
- collectionView.endAllRefreshing() |
|
65 |
+ collectionView.removeAllPullToRefresh() |
|
66 | 66 |
} |
67 | 67 |
} |
68 | 68 |
|
@@ -23,6 +23,7 @@ final class ScanQRViewController: UIViewController { |
||
23 | 23 |
override func viewDidLoad() { |
24 | 24 |
super.viewDidLoad() |
25 | 25 |
scanView.delegate = self |
26 |
+ setNavigationBar() |
|
26 | 27 |
viewModel.join(code: "http://pai.ai/g/SpA5be3") |
27 | 28 |
} |
28 | 29 |
|
@@ -32,8 +33,8 @@ final class ScanQRViewController: UIViewController { |
||
32 | 33 |
} |
33 | 34 |
|
34 | 35 |
override func viewWillAppear(_ animated: Bool) { |
35 |
- setNavigationBar() |
|
36 | 36 |
super.viewWillAppear(animated) |
37 |
+ |
|
37 | 38 |
} |
38 | 39 |
|
39 | 40 |
override func viewWillDisappear(_ animated: Bool) { |
@@ -14,7 +14,8 @@ class MessageCoordinator: BaseCoordinator<Void> { |
||
14 | 14 |
fileprivate let messageViewController: MessageViewController |
15 | 15 |
|
16 | 16 |
init(_ viewController: MessageViewController, |
17 |
- navigationController: UINavigationController) { |
|
17 |
+ navigationController: UINavigationController, |
|
18 |
+ containerViewController: ContainerViewController) { |
|
18 | 19 |
messageViewController = viewController |
19 | 20 |
super.init(navigationController: navigationController, viewController: viewController) |
20 | 21 |
} |
@@ -91,7 +91,7 @@ final class MessageListViewController: UIViewController { |
||
91 | 91 |
} |
92 | 92 |
|
93 | 93 |
deinit { |
94 |
- tableView.endAllRefreshing() |
|
94 |
+ tableView.removeAllPullToRefresh() |
|
95 | 95 |
} |
96 | 96 |
} |
97 | 97 |
|
@@ -58,7 +58,7 @@ final class MineGroupViewController: UIViewController { |
||
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
deinit { |
61 |
- tableView.endAllRefreshing() |
|
61 |
+ tableView.removeAllPullToRefresh() |
|
62 | 62 |
} |
63 | 63 |
} |
64 | 64 |
|
@@ -55,7 +55,7 @@ final class MineOrderViewController: UIViewController { |
||
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
deinit { |
58 |
- tableView.endAllRefreshing() |
|
58 |
+ tableView.removeAllPullToRefresh() |
|
59 | 59 |
} |
60 | 60 |
} |
61 | 61 |
|