titleLabel

Tabber·2021년 7월 5일
0

Apple Document

목록 보기
4/12

A view that displays the value of the currentTitle property for a button.
버튼의 현재 타이틀을 보여줍니다.

Discussion

Although this property is read-only, its own properties are read/write. Use these properties primarily to configure the text of the button.
이 속성은 읽기 전용이지만 자체 속성은 읽기/쓰기입니다. 이러한 속성은 주로 버튼의 텍스트를 구성하는 데 사용합니다.

Do not use the label object to set the text color or the shadow color. Instead, use the setTitleColor(:for:) and setTitleShadowColor(:for:) methods of this class to make those changes. To set the actual text of the label, use setTitle(_:for:) (button.titleLabel.text does not let you set the text).

라벨 객체를 사용하여 텍스트 색상 또는 섀도 색상을 설정하지 마십시오. 대신 setTitleColor(:for:) 및 setTitleShadowColor(:for:) 메서드를 사용하여 변경하십시오. 레이블의 실제 텍스트를 설정하려면 setTitle(_:for:)(button.titleLabel.text를 사용하여 텍스트를 설정할 수 없습니다.)을 사용하십시오.

The titleLabel property returns a value even if the button has not been displayed yet. The value of the property is nil for system buttons.
TitleLabel 속성은 버튼이 아직 표시되지 않은 경우에도 값을 반환합니다. 시스템 버튼의 속성 값은 0입니다.

profile
iOS 정복중인 Tabber 입니다.

0개의 댓글