본문 바로가기 메뉴 바로가기

iOS LearningMachine🔥

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

iOS LearningMachine🔥

검색하기 폼
  • 분류 전체보기 (68)
    • iOS & swift (42)
    • algorithm (5)
    • computer science (20)
  • 방명록

swift 자간 (2)
자간, 행간 (Extension UILabel)

먼저 행간 설정입니다. // 행간 extension UILabel { func setLineSpacing(ratio: Double) { let style = NSMutableParagraphStyle() let lineheight = self.font.pointSize * ratio //font size * multiple style.minimumLineHeight = lineheight style.maximumLineHeight = lineheight self.attributedText = NSAttributedString( string: self.text ?? "", attributes: [ .paragraphStyle: style ]) } } extension UILabel { func setLin..

iOS & swift 2023. 12. 9. 19:25
UILabel Text 자간 수정하기 (extension UILabel, character spacing)

이렇게 디자이너가 -3%의 수치로 자간을 줬을때, code로 UILabel의 자간을 수정하는 방법입니다. 디자이너입장에서 이런 디테일을 아주 중요시 하기때문에 개발자의 눈에는 별 차이가 없더라도 그냥 넘어갈 수 없습니다~ self.font.pointSize 로 UILabel마다 다른 font 사이즈에 접근해줄 수 있어요. (default는 -3%) extension UILabel { func addCharacterSpacing(_ value: Double = -0.03) { let kernValue = self.font.pointSize * CGFloat(value) guard let text = text, !text.isEmpty else { return } let string = NSMutableAt..

iOS & swift 2022. 8. 16. 19:39
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • 비동기 리스트 swift
  • swift network 공통화
  • swift network refactoring
  • filemanager excel read
  • swift excel read
  • swift 엑셀 가져오기
  • swift urlcomponent encode
  • llm pdf rag
  • chatgpt rag llm
  • swift filemanager excel
  • rag llm pdf
  • swift network module
  • 레디세이 어플
  • concurrency pagination
  • 엔디소프트 레이세이
  • swift get excel
  • 비동기 페이징 swift
  • swift 자간
  • swift urlsession refactoring
  • swift urlsession 공통화
  • swift filemanager get excel
  • swift queryitem encode
  • 공부 타이머 어플
  • 레디세이
  • llm csv
  • rag 기반 llm 챗봇
  • swift 엑셀 읽기
  • rag 기반 llm
  • swift 네트워크 모듈화
  • readysay
more
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바