git.iko.soy/dashared/GDproject
on master help sign in
Fixed a few bags. by Ilyas iPhon X
commit12b1bfd07e5d0523092a8666d18357891206889e authorDarya Rednikina <rednikina.com@yandex.ru> dateMon 13 May 2019, 23:37 (7 years ago) parentd03e636
2 files changed+5−4
GDproject/Controller/ News and channels/NewsController.swift+2−1 GDproject/Controller/Messages/Dialog/DialogViewController.swift+3−3
GDproject/Controller/ News and channels/NewsController.swift+2−1
@@ -82,7 +82,7 @@ class NewsController: UIViewController, UISearchControllerDelegate, UpdateableWi
8282 searchController?.searchBar.placeholder = "Search tags"
8383 }
8484
85− @objc func refreshPostsData( _ ff: UIRefreshControl){
85+ @objc func refreshPostsData( _ ff: UIRefreshControl) {
8686 decideWhatChannelDisplay()
8787 }
8888
@@ -122,6 +122,7 @@ class NewsController: UIViewController, UISearchControllerDelegate, UpdateableWi
122122 }
123123 }
124124 default:
125+ refreshContr.endRefreshing()
125126 break
126127 }
127128
GDproject/Controller/Messages/Dialog/DialogViewController.swift+3−3
@@ -158,7 +158,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
158158
159159 messageSendView.edgesToSuperview(excluding: [.top,.bottom])
160160
161− bottomConstraint = NSLayoutConstraint(item: messageSendView, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1, constant: 0)
161+ bottomConstraint = NSLayoutConstraint(item: messageSendView, attribute: .bottom, relatedBy: .equal, toItem: self.view.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1, constant: 0)
162162 view.addConstraint(bottomConstraint)
163163
164164 messageSendView.height(60)
@@ -172,7 +172,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
172172 messageTextView.edgesToSuperview(excluding: .right)
173173 messageTextView.rightToLeft(of: sendButton)
174174
175− tableView.edgesToSuperview(excluding: .bottom)
175+ tableView.edgesToSuperview(excluding: .bottom, insets: .top(self.navigationController?.navigationBar.frame.size.height ?? 0))
176176 tableView.bottomToTop(of: messageSendView)
177177
178178 self.view.layoutSubviews()
@@ -191,7 +191,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
191191
192192 let keyBoardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue
193193
194− bottomConstraint.constant = notification.name == UIResponder.keyboardWillShowNotification ? -(keyBoardFrame.height) : 0
194+ bottomConstraint.constant = notification.name == UIResponder.keyboardWillShowNotification ? -(keyBoardFrame.height) + self.view.safeAreaInsets.bottom : 0
195195
196196 UIView.animate(withDuration: 0, delay: 0, options: .curveEaseOut, animations: {
197197 self.view.layoutIfNeeded()