Skip to content

Commit

Permalink
[#21] NotificationCenter 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdalswl committed Jan 13, 2025
1 parent 9a57a6e commit 580d4ec
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Handy/Handy/Source/Atom/HandyTextView/HandyBaseTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ public class HandyBaseTextView: UITextView {
fatalError("init(coder:) has not been implemented")
}

deinit {
NotificationCenter.default.removeObserver(self)
}

private func setupView() {
self.delegate = self
self.font = HandyFont.B3Rg14
Expand Down Expand Up @@ -102,10 +98,6 @@ public class HandyBaseTextView: UITextView {
$0.edges.equalToSuperview().inset(textContainerInset)
}

NotificationCenter.default.addObserver(self,
selector: #selector(textDidChange),
name: UITextView.textDidChangeNotification,
object: nil)
} else {
placeholderLabel?.text = placeholder
}
Expand Down Expand Up @@ -155,7 +147,7 @@ public class HandyBaseTextView: UITextView {
)
}

@objc private func textDidChange() {
private func textDidChange() {
placeholderLabel?.isHidden = !text.isEmpty
}
}
Expand Down

0 comments on commit 580d4ec

Please sign in to comment.