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

[Chore] #20 - Font 행간 설정, Font 추가, Color assets 이름바꾸기 #27

Merged
merged 7 commits into from
Jul 8, 2024

Conversation

shimseohyun
Copy link
Contributor

@shimseohyun shimseohyun commented Jul 8, 2024

🔥 Pull requests

👷 작업한 내용

  • Font 행간 설정
  • Font 추가 (pretendard Body6, suite H3)
  • Color assets 명 Hankki 추가

🚨 참고 사항

.red, .white로 된 것들 전부 .hankkiRed, .hankkiWhite 로 바꿔주시면 될 것 같아요!

🖥️ 주요 코드 설명

  • UILabel +
static func setupAttributedText<T: FontStyle>(
        for fontName: T,
        withText text: String = "",
        color: UIColor = .black
    ) -> NSAttributedString

Label의 attrubuted text를 설정하는 메서드입니다!

  • Label에서 사용시
        titleLabel.do {
            $0.attributedText = UILabel.setupAttributedText(
                for: PretendardStyle.subtitle3,
                withText: titleText,
                color: .black
            )
        }
  • Button의 Label 에서 사용시
button.do {
            if let attributedTitle = UILabel.setupAttributedText(
                for: PretendardStyle.subtitle3,
                withText: title,
                color: titleColor
            ) {
                $0.setAttributedTitle(attributedTitle, for: .normal)
            }
        }

UIButton의 setAttributedTitle를 활용해주시면 됩니다.

✅ Check List

  • Merge 대상 브랜치가 올바른가?
  • 최종 코드가 에러 없이 잘 동작하는가?
  • 전체 변경사항이 500줄을 넘지 않는가?

📟 관련 이슈

@shimseohyun shimseohyun added 🎨 Design UI 디자인을 구현하거나 변경 🤹🏻‍♀️ 서현 서현 공주 작업 labels Jul 8, 2024
@shimseohyun shimseohyun self-assigned this Jul 8, 2024
@shimseohyun shimseohyun changed the title [Chore] Font 행간 설정, Font 추가, Color assets 이름바꾸기 [Chore] #20 - Font 행간 설정, Font 추가, Color assets 이름바꾸기 Jul 8, 2024
Copy link
Member

@mcrkgus mcrkgus 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
Member

@EunsuSeo01 EunsuSeo01 left a comment

Choose a reason for hiding this comment

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

고생했어요!!

@shimseohyun shimseohyun merged commit f3c9f76 into develop Jul 8, 2024
@shimseohyun shimseohyun deleted the chore/#20 branch July 8, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Design UI 디자인을 구현하거나 변경 🤹🏻‍♀️ 서현 서현 공주 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chore] Font 행간 설정
3 participants