diff --git a/ForegroundNotification/Classes/ForegroundNotificationView.swift b/ForegroundNotification/Classes/ForegroundNotificationView.swift index c33d6c3..f368c48 100644 --- a/ForegroundNotification/Classes/ForegroundNotificationView.swift +++ b/ForegroundNotification/Classes/ForegroundNotificationView.swift @@ -351,7 +351,7 @@ class ForegroundNotificationView: UIView, UITextViewDelegate { @IBAction func sendButtonTapped(_ sender: UIButton) { - if !textView.text.characters.isEmpty { + if !textView.text.isEmpty { dismissNotification { @@ -389,19 +389,19 @@ class ForegroundNotificationView: UIView, UITextViewDelegate { //MARK: - Internal - func keyboardWillShow(notification: NSNotification) { + @objc func keyboardWillShow(notification: NSNotification) { currentHeightForKeyboard = (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue.size.height ?? 0 } - func keyboardWillHide() { + @objc func keyboardWillHide() { currentHeightForKeyboard = 0 } - func dimmingViewTapped(tapRecognizer: UITapGestureRecognizer) { + @objc func dimmingViewTapped(tapRecognizer: UITapGestureRecognizer) { dismissNotification() } - func orientationDidChange() { + @objc func orientationDidChange() { if extendingIsFinished { @@ -476,7 +476,7 @@ class ForegroundNotificationView: UIView, UITextViewDelegate { } } - func dismissAfterTimer() { + @objc func dismissAfterTimer() { dismissNotification() } diff --git a/README.md b/README.md index 9e93364..bb13f67 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ pod "BSForegroundNotification" If you used `use_framework` in your podfile just simply do: ```Swift -import ForegroundNotification +import BSForegroundNotification ``` @@ -32,7 +32,7 @@ for every file when you need to use it. you may also use: ```Swift -@import ForegroundNotification +@import BSForegroundNotification ``` within **bridging header** file and avoid to import framework for every needed file.