This commit is contained in:
Chris Li 2016-12-28 16:14:01 -05:00
parent b094869110
commit 604013e247
4 changed files with 4 additions and 10 deletions

View File

@ -20,18 +20,10 @@ class SearchBaseTableController: CoreDataTableBaseController, DZNEmptyDataSetSou
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
tableView.emptyDataSetSource = nil
tableView.emptyDataSetDelegate = nil
NotificationCenter.default.removeObserver(self, name: .UIKeyboardDidShow, object: nil) NotificationCenter.default.removeObserver(self, name: .UIKeyboardDidShow, object: nil)
NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil) NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil)
} }
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
tableView.emptyDataSetSource = self
tableView.emptyDataSetDelegate = self
}
func keyboardDidShow(notification: Notification) { func keyboardDidShow(notification: Notification) {
guard let userInfo = notification.userInfo as? [String: NSValue], guard let userInfo = notification.userInfo as? [String: NSValue],
let origin = userInfo[UIKeyboardFrameEndUserInfoKey]?.cgRectValue.origin else {return} let origin = userInfo[UIKeyboardFrameEndUserInfoKey]?.cgRectValue.origin else {return}

View File

@ -27,6 +27,8 @@ class SearchBooksController: SearchBaseTableController, UITableViewDelegate, UIT
super.viewWillAppear(animated) super.viewWillAppear(animated)
tableView.reloadData() tableView.reloadData()
configureRecentSearchBarHeight() configureRecentSearchBarHeight()
tableView.emptyDataSetSource = self
tableView.emptyDataSetDelegate = self
} }
func configureRecentSearchBarHeight() { func configureRecentSearchBarHeight() {

View File

@ -49,7 +49,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.8.3843</string> <string>1.8.3845</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>

View File

@ -21,7 +21,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.8.3861</string> <string>1.8.3863</string>
<key>NSExtension</key> <key>NSExtension</key>
<dict> <dict>
<key>NSExtensionMainStoryboard</key> <key>NSExtensionMainStoryboard</key>