Conversation
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 characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⭐️Issue
🌟Motivation
🌟Key Changes
공지사항 상세 화면에서 본문 텍스트가 잘려보이는 문제를 수정했습니다.
기존에는
notificationContentTextView의 높이를 동적으로 계산하기 위해getTextViewLabelHeight(text:)메서드를 별도로 구현하고,bindData시점에snp.updateConstraints로 높이를 직접 지정하는 방식을 사용했습니다.이 메서드는 임시 UILabel을 생성해 텍스트를 렌더링한 뒤 sizeToFit()으로 높이를 측정하는 방식이었는데, 실제 TextView의 렌더링 결과와 차이가 발생해 내용이 잘리는 버그가 있었습니다.
이번 수정에서는 해당 수동 높이 계산 로직을 전부 제거하고,
setupLayout내 초기 constraints에서 $0.height.equalTo(0) 설정도 함께 제거했습니다.이를 통해 TextView가 AutoLayout에 의해 콘텐츠 크기에 맞게 자연스럽게 늘어나도록 변경되었습니다.
🌟Simulation
🌟To Reviewer
🌟Reference