Skip to content
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

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

eemdeeks
Copy link
Member

@eemdeeks eemdeeks commented Dec 1, 2024

🌁 Background

키보드의 유무에 따라 Layout을 변경 해주는 코드에서 키보드가 이모티콘 키보드로 변경시에도 키보드를 올렸다는 이벤트가 NotificationCenter에서 발생하는 것을 발견 해 고쳤습니다.

📱 Screenshot

수정하기 전

Simulator Screen Recording - iPhone 16 Pro - 2024-12-01 at 23 51 43

수정 후

Simulator Screen Recording - iPhone 16 Pro - 2024-12-01 at 23 49 23

👩‍💻 Contents

키보드에 따라 뷰 layout변경하는 부분을 수정했습니다.

✅ Testing

채팅 뷰에 들어가서 채팅을 보낼 때 키보드를 변경 해보시면 됩니다.

@eemdeeks eemdeeks added this to the 채팅 milestone Dec 1, 2024
@eemdeeks eemdeeks self-assigned this Dec 1, 2024
Copy link
Collaborator

@ekrud99 ekrud99 left a 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?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이름이 더 야미네유

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

야미!

Copy link
Collaborator

@taipaise taipaise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

키보드 버그 수정 야미 입니다~ 어푸루브!!

Copy link
Collaborator

@choijungp choijungp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿뽀이 ~~

Comment on lines +178 to +182
var keyboardInset: CGFloat = 0
if let keyboardHeight {
keyboardInset = keyboardFrame.cgRectValue.height - keyboardHeight
} else {
keyboardInset = keyboardFrame.cgRectValue.height
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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까지는 없어두 될듯요 !!!

@taipaise taipaise merged commit 9cf5f35 into develop Dec 2, 2024
1 check passed
@eemdeeks eemdeeks deleted the fix/keyboardInteraction branch December 2, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants