igationController?.navigationBar.addSubview(navigationBarView)
|
|
166
|
+ private func constructNaivgationViewHierarchy() {
|
|
|
167
|
+ navigationItem.titleView = navigationBarView
|
|
168
|
168
|
navigationBarView.addSubview(navigationBarViewImage)
|
|
169
|
169
|
navigationBarView.addSubview(navigationBarViewTitle)
|
|
170
|
170
|
}
|
|
|
|
@@ -172,7 +172,7 @@ extension GroupViewController: NavigationBarInteractiveViewController {
|
|
172
|
172
|
private func setRightBarButtonItems() {
|
|
173
|
173
|
let item = UIBarButtonItem(images: [UIImage(named: "navigation-QR"),
|
|
174
|
174
|
UIImage(named: "navigation-right")],
|
|
175
|
|
- targets: [self, viewModel],
|
|
|
175
|
+ targets: [self, viewModel!],
|
|
176
|
176
|
actions: [#selector(GroupViewController.presentGroupQR),
|
|
177
|
177
|
#selector(GroupViewModel.navigateToGroupDetail)])
|
|
178
|
178
|
|
|
|
|
@@ -194,23 +194,10 @@ extension GroupViewController: NavigationBarInteractiveViewController {
|
|
194
|
194
|
fileprivate extension GroupViewController {
|
|
195
|
195
|
|
|
196
|
196
|
func activateConstraintsNavigation() {
|
|
197
|
|
- activateConstraintsNavigationBarView()
|
|
198
|
197
|
activateConstraintsNavigationBarViewImage()
|
|
199
|
198
|
activateConstraintsNavigationBarViewTitle()
|
|
200
|
199
|
}
|
|
201
|
200
|
|
|
202
|
|
- func activateConstraintsNavigationBarView() {
|
|
203
|
|
- guard let barContentView = navigationController?.navigationBar else { return }
|
|
204
|
|
-
|
|
205
|
|
- navigationBarView.translatesAutoresizingMaskIntoConstraints = false
|
|
206
|
|
-
|
|
207
|
|
- NSLayoutConstraint.activate([
|
|
208
|
|
- navigationBarView.topAnchor.constraint(equalTo: barContentView.topAnchor),
|
|
209
|
|
- navigationBarView.bottomAnchor.constraint(equalTo: barContentView.bottomAnchor),
|
|
210
|
|
- navigationBarView.centerXAnchor.constraint(equalTo: barContentView.centerXAnchor)
|
|
211
|
|
- ])
|
|
212
|
|
- }
|
|
213
|
|
-
|
|
214
|
201
|
func activateConstraintsNavigationBarViewTitle() {
|
|
215
|
202
|
navigationBarViewTitle.translatesAutoresizingMaskIntoConstraints = false
|
|
216
|
203
|
NSLayoutConstraint.activate([
|
|
|
|
@@ -24,7 +24,8 @@ final class ScanQRViewController: UIViewController {
|
|
24
|
24
|
override func viewDidLoad() {
|
|
25
|
25
|
super.viewDidLoad()
|
|
26
|
26
|
scanView.delegate = self
|
|
27
|
|
- viewModel.join(code: "http://pai.ai/g/SpA5be3")
|
|
|
27
|
+// viewModel.join(code: "http://pai.ai/g/SpA5be3")
|
|
|
28
|
+ setNavigationBar()
|
|
28
|
29
|
}
|
|
29
|
30
|
|
|
30
|
31
|
func setNavigationBar() {
|
|
|
|
@@ -34,7 +35,7 @@ final class ScanQRViewController: UIViewController {
|
|
34
|
35
|
|
|
35
|
36
|
override func viewWillAppear(_ animated: Bool) {
|
|
36
|
37
|
super.viewWillAppear(animated)
|
|
37
|
|
- setNavigationBar()
|
|
|
38
|
+
|
|
38
|
39
|
}
|
|
39
|
40
|
|
|
40
|
41
|
override func viewWillDisappear(_ animated: Bool) {
|
|
|
|
@@ -48,7 +48,7 @@ final class MessageListViewController: UIViewController {
|
|
48
|
48
|
setup()
|
|
49
|
49
|
binding()
|
|
50
|
50
|
setNavigationBar()
|
|
51
|
|
- self.viewModel.reload()
|
|
|
51
|
+ self.viewModel.reload()
|
|
52
|
52
|
}
|
|
53
|
53
|
|
|
54
|
54
|
private func setNavigationBar() {
|
|
|
|
@@ -174,19 +174,6 @@ fileprivate extension MessageListViewController {
|
|
174
|
174
|
self.tableView.endRefreshing(at: .bottom)
|
|
175
|
175
|
}
|
|
176
|
176
|
}).disposed(by: disposeBag)
|
|
177
|
|
-
|
|
178
|
|
- viewModel.hasMoreData
|
|
179
|
|
- .asDriver(onErrorJustReturn: true)
|
|
180
|
|
- .drive(onNext: {[weak self] flag in
|
|
181
|
|
- guard let `self` = self else { return }
|
|
182
|
|
- if flag {
|
|
183
|
|
- if self.tableView.bottomPullToRefresh == nil {
|
|
184
|
|
- self.setupLoadingControl()
|
|
185
|
|
- }
|
|
186
|
|
- } else {
|
|
187
|
|
-// self.tableViewt
|
|
188
|
|
- }
|
|
189
|
|
- }).disposed(by: disposeBag)
|
|
190
|
177
|
}
|
|
191
|
178
|
}
|
|
192
|
179
|
|
|
|
|
@@ -128,19 +128,6 @@ fileprivate extension MineGroupViewController {
|
|
128
|
128
|
self.tableView.endRefreshing(at: .bottom)
|
|
129
|
129
|
}
|
|
130
|
130
|
}).disposed(by: disposeBag)
|
|
131
|
|
-
|
|
132
|
|
- viewModel.hasMoreData
|
|
133
|
|
- .asDriver(onErrorJustReturn: true)
|
|
134
|
|
- .drive(onNext: {[weak self] flag in
|
|
135
|
|
- guard let `self` = self else { return }
|
|
136
|
|
- if flag {
|
|
137
|
|
- if self.tableView.bottomPullToRefresh == nil {
|
|
138
|
|
- self.setupLoadingControl()
|
|
139
|
|
- }
|
|
140
|
|
- } else {
|
|
141
|
|
- // self.tableViewt
|
|
142
|
|
- }
|
|
143
|
|
- }).disposed(by: disposeBag)
|
|
144
|
131
|
}
|
|
145
|
132
|
}
|
|
146
|
133
|
|
|
|
|
@@ -111,19 +111,6 @@ fileprivate extension MineOrderViewController {
|
|
111
|
111
|
self.tableView.endRefreshing(at: .bottom)
|
|
112
|
112
|
}
|
|
113
|
113
|
}).disposed(by: disposeBag)
|
|
114
|
|
-
|
|
115
|
|
- viewModel.hasMoreData
|
|
116
|
|
- .asDriver(onErrorJustReturn: true)
|
|
117
|
|
- .drive(onNext: {[weak self] flag in
|
|
118
|
|
- guard let `self` = self else { return }
|
|
119
|
|
- if flag {
|
|
120
|
|
- if self.tableView.bottomPullToRefresh == nil {
|
|
121
|
|
- self.setupLoadingControl()
|
|
122
|
|
- }
|
|
123
|
|
- } else {
|
|
124
|
|
- // self.tableViewt
|
|
125
|
|
- }
|
|
126
|
|
- }).disposed(by: disposeBag)
|
|
127
|
114
|
}
|
|
128
|
115
|
}
|
|
129
|
116
|
|