-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] 키보드 변경에 따른 UI 오류 수정 #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개인적으로 애니메이션 없는것도 자연스럽고 이쁜듯요 ㅎㅎ
고생하셨습니다~
@@ -32,7 +32,7 @@ public final class ChatViewController: UIViewController { | |||
private var dataSource: UICollectionViewDiffableDataSource<CollectionViewSection, ChatMessageCellModel>? | |||
private let viewModel: ChatViewModel | |||
private var cancellables: Set<AnyCancellable> | |||
private var keyboardSize: CGRect? | |||
private var keyboardHeight: CGFloat? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이름이 더 야미네유
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
야미!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
키보드 버그 수정 야미 입니다~ 어푸루브!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿뽀이 ~~
var keyboardInset: CGFloat = 0 | ||
if let keyboardHeight { | ||
keyboardInset = keyboardFrame.cgRectValue.height - keyboardHeight | ||
} else { | ||
keyboardInset = keyboardFrame.cgRectValue.height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var keyboardInset: CGFloat = 0 | |
if let keyboardHeight { | |
keyboardInset = keyboardFrame.cgRectValue.height - keyboardHeight | |
} else { | |
keyboardInset = keyboardFrame.cgRectValue.height | |
var keyboardInset: CGFloat = keyboardFrame.cgRectValue.height | |
if let keyboardHeight { | |
keyboardInset -= keyboardHeight | |
} |
이르케 하면 else까지는 없어두 될듯요 !!!
🌁 Background
키보드의 유무에 따라 Layout을 변경 해주는 코드에서 키보드가 이모티콘 키보드로 변경시에도 키보드를 올렸다는 이벤트가 NotificationCenter에서 발생하는 것을 발견 해 고쳤습니다.
📱 Screenshot
수정하기 전
수정 후
👩💻 Contents
키보드에 따라 뷰 layout변경하는 부분을 수정했습니다.
✅ Testing
채팅 뷰에 들어가서 채팅을 보낼 때 키보드를 변경 해보시면 됩니다.