Last active
June 2, 2019 18:13
-
-
Save M0rtyMerr/6d885a4fb4d6acabcc052070917e33be to your computer and use it in GitHub Desktop.
Revisions
-
M0rtyMerr revised this gist
Jun 2, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,7 @@ override func viewDidLoad() { @objc func keyboardChangedFrame(notification: Notification) { guard let keyboardFrame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else { return } let keyboardHeight = keyboardFrame.cgRectValue.height scrollView.contentInset.bottom = keyboardHeight } //____________________// -
M0rtyMerr revised this gist
Jan 20, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // native way override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver( -
M0rtyMerr revised this gist
Jan 20, 2019 . No changes.There are no files selected for viewing
-
M0rtyMerr revised this gist
Jan 20, 2019 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +0,0 @@ -
M0rtyMerr revised this gist
Jan 20, 2019 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ RxKeyboard.instance.isHidden .drive(backgroundFadeView.rx.isHidden) .disposed(by: disposeBag) -
M0rtyMerr revised this gist
Jan 20, 2019 . 2 changed files with 24 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ // native imperative way override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver( self, selector: #selector(keyboardChangedFrame), name: UIResponder.keyboardDidChangeFrameNotification, object: nil ) } @objc func keyboardChangedFrame(notification: Notification) { guard let keyboardFrame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else { return } let keyboardHeight = keyboardFrame.cgRectValue.height } //____________________// // RxKeyboard override func viewDidLoad() { super.viewDidLoad() RxKeyboard.instance.visibleHeight .drive(onNext: { [unowned self] in self.tableView.contentInset.bottom = $0 }) .disposed(by: disposeBag) } -
M0rtyMerr created this gist
Jan 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // native imperative way override func viewDidLoad NotificationCenter.default.addObserver( self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil ) @objc private func keyboardWillShow(_ notification: Notification) { guard let keyboardFrame: NSValue = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue else { return } let keyboardHeight = keyboardRectangle.height }