티스토리 뷰

iOS

iOS) UITextField placeholder 색 변경하기

hyun99999 2021. 9. 28. 21:12
728x90
반응형

내용

  • UITextField placehodler color 변경

결과

textField.attributedPlaceholder = NSAttributedString(string: "명함이름", attributes: [NSAttributedString.Key.foregroundColor: UIColor.system6])

다음과 같이 textField 가 어두운 경우 placeholder 의 색을 밝게 변경할 수 있다.

728x90
반응형
댓글
최근에 올라온 글
최근에 달린 댓글
글 보관함
«   2024/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
링크
Total
Today
Yesterday