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

[IDLE-000] 3번쨰 QA피드백 반영 #72

Merged
merged 10 commits into from
Sep 23, 2024
Merged

Conversation

J0onYEong
Copy link
Contributor

변경된점

  • UI
  • 요양보호사 프로필 업러드 수정
  • '취소하기' 버튼을 눌렀는데 지원하기가 되는 문제 해결
  • lineHeight 설정해결

lineHeight 설정해결

NSAttributedString을 UILabel에 사용할 때, NSParagraphStyle을 통해 lineHeight설정시 예상치 못한 문제가 발생했다.
lineHeight의 경우 베이스라인과 베이스라인 사이의 간격이다. 문제는 첫번째 라인은 상위 베이스 라인이 없음에도 지정한 lineHeight만큼의 여백이 생긴다.
따라서 라벨의 텍스트가 중앙에 배치되지 못하고 다소 아래로 설정되게된다.
이를 해결하는 방법은 baseLine Offset을 직접수정해주는 것이다.

font를 통해 lineHeight를 도출한다. (UIFont의 lineHeight는 모든 문자가 적절하게 표현되는 길이로 산정된다.)
그리고 라벨의 lineHeight에
서 앞서 도출한 값(폰트의 lineHeight)을 빼고 2로나눈 값만큼 offset을 조정해준다.

스크린샷 2024-09-23 오후 4 10 16

@J0onYEong J0onYEong merged commit 4f8e32d into develop Sep 23, 2024
1 check passed
@J0onYEong J0onYEong deleted the feedback/second_qa branch September 23, 2024 07:10
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.

1 participant