[UIKit] UILabel

Bibi·2022년 2월 16일
0

[UIKit] UILabel

https://developer.apple.com/documentation/uikit/uilabel

UILabel

: A view that displays one or more lines of informational text.

하나 이상의 정보 텍스트 줄을 표시하는 뷰.

UILabel의 주요 프로퍼티

  • text, attributedText (label 의 텍스트)
  • font, textColor (폰트, 색상)
  • textAliingment (정렬)
  • lineBreakMode, lineBreakStrategy (줄바꿈 모드)
  • ... 등이 있다.

@IBOutlet weak var myLabel: UILabel!

https://velog.io/@wook4506/iOS-Swift-UILabel%EC%97%90-%EB%8C%80%ED%95%B4-%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90

  • IB : Interface Builder 의 약자
  • Outlet : 데이터를 가져오는 것
    • IBOutlet : Interface Builder를 통해 받아온 정보로 변수를 가져온다.
  • weak : 약한 참조. 해당 인스턴스의 주소값만 가짐(포인터 개념)

0개의 댓글