Notice
Recent Posts
Recent Comments
Link
목록UITextView (1)
아미(아름다운미소)
UITextField 또는 UITextView 문자 수를 제한하는 방법
UITextField또는 UITextView에 사용자가 특정 글자 수보다 더를 입력되는것을 방지하려면 shouldChangeCharactersIn(텍스트 필드) 또는 shouldChangeTextIn(텍스트 뷰) 를 사용하시면 됩니다.UITextField (한 줄)로 작업하는지 또는 UITextView (여러 줄)로 작업하는지에 따라서 두 가지 방법 중 하나를 사용 하시면 됩니다. - textField func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let currentText = textField.text ?? "" guard ..
랭귀지/SWIFT
2018. 5. 20. 09:30