UITextField에 대한 UI 속성
https://developer.apple.com/documentation/uikit/uitextfield/1619643-textalignment
placeholder : ~를 입력하라고 안내해주는 안내문구
placeholder에 쓰는 글씨 색상 변경:
사용예시 >>
emailtxtField.attributedPlaceholder = NSAttributedString(string: "이메일 주소 또는 전화번호", attributes: [NSAttributedString.Key.foregroundColor : UIColor.lightGray])
isSecureTextEntry : 비밀번호 입력시 ***** 로 뜨면서 정보보호
borderStyle : .roundRect, .bezel, .line, .none
https://boidevelop.tistory.com/62
textColor: 사용자가 무언가를 텍스트필드에 새롭게 입력할 때 여기에 입력하는 색깔로 나타난다.
keyboardType
textAlignment
backgroundColor: textField 전체를 채우는 배경 색깔 변경.
*UITextfield 관련하여 구현 가능한 한줄짜리 코드:
문자에 인증번호 와서 앱 위에 키보드에 자동완성쪽에 뜨는거 누르면 바로 입력되는거.
numberTextField.textContentType = .oneTimeCode
'iOS > iOS SeSAC 2기 TIL' 카테고리의 다른 글
iOS swift Label 요소 (0) | 2022.07.07 |
---|---|
iOS UISwitch에 대한 UI 속성 (0) | 2022.07.06 |
Swift file vs. CocoaTouch Class file (0) | 2022.07.06 |
7.6 [수업복습] 생명주기, 다크모드, 키보드 (0) | 2022.07.06 |
7.5 수업 복습 - UI 관련 (0) | 2022.07.05 |