|
@@ -72,23 +72,19 @@ class NewChatViewController: UITableViewController {
|
|
deviceContactHandler.importDeviceContacts()
|
|
deviceContactHandler.importDeviceContacts()
|
|
navigationItem.searchController = searchController
|
|
navigationItem.searchController = searchController
|
|
definesPresentationContext = true // to make sure searchbar will only be shown in this viewController
|
|
definesPresentationContext = true // to make sure searchbar will only be shown in this viewController
|
|
|
|
+ if #available(iOS 11.0, *) {
|
|
|
|
+ navigationItem.hidesSearchBarWhenScrolling = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
super.viewWillAppear(animated)
|
|
deviceContactAccessGranted = CNContactStore.authorizationStatus(for: .contacts) == .authorized
|
|
deviceContactAccessGranted = CNContactStore.authorizationStatus(for: .contacts) == .authorized
|
|
contactIds = Utils.getContactIds()
|
|
contactIds = Utils.getContactIds()
|
|
- // this will show the searchbar on launch -> will be set back to true on viewDidAppear
|
|
|
|
- if #available(iOS 11.0, *) {
|
|
|
|
- navigationItem.hidesSearchBarWhenScrolling = false
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
super.viewDidAppear(animated)
|
|
super.viewDidAppear(animated)
|
|
- if #available(iOS 11.0, *) {
|
|
|
|
- navigationItem.hidesSearchBarWhenScrolling = true
|
|
|
|
- }
|
|
|
|
|
|
|
|
let nc = NotificationCenter.default
|
|
let nc = NotificationCenter.default
|
|
syncObserver = nc.addObserver(
|
|
syncObserver = nc.addObserver(
|