본문 바로가기

Weekoding

검색하기
Weekoding
프로필사진 Still Coding In After Hours...   iOS / Swift

  • 분류 전체보기 (32)
    • 공부 노트(Swift) (28)
    • 개발 노트 (0)
    • 그 외 (1)
Guestbook
Recent Posts
Tags
  • Label
  • CALayer
  • Assets
  • AppleLogin
  • xcode
  • SignInWithApple
  • Inheritance
  • Swift
  • NSAttributedString
  • SceneDelegate
  • CGColor
  • SnapKit
  • Console
  • oauth
  • CornerRadius
  • ios
  • UIView
  • Structure
  • 프로퍼티옵저버
  • CAGradientLayer
  • cgrect
  • property observer
  • 모바일개발
  • lifecycle
  • TextView
  • property
  • SNS로그인
  • Enterprise
  • Lazy
  • Debugging
more
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록NSAttributedString (1)

Weekoding

[Swift] Label의 문자열 일부 변경하기(크기, 색상)

Label을 사용할 때, 크기나 색상이 일관적이지 않은 경우를 보았을 것이다. 보통 특정 문자를 강조할 때 사용되고, 때에 따라서는 버튼으로 유도되기도 한다. 크기나 색이 다른 부분을 각각 다른 Label로 사용해서 구현할 수도 있겠지만, 레이아웃을 걸기가 까다로워지며 재사용성도 떨어진다. 한 Label의 문자열 내에서 일부의 크기나 색상을 변경하는 방법에 대해서 알아보고, 구현해보도록 하자. 📂 NSMutableAttributedString A mutable string with associated attributes (such as visual style, hyperlinks, or accessibility data) for portions of its text. : 텍스트 일부(portions)에 ..

공부 노트(Swift) 2023. 6. 25. 23:58
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바