issues
search
chausovSurfStudio
/
TextFieldsCatalog
This is catalog of various input field with great opportunities for validation and formatting.
MIT License
25
stars
8
forks
source link
CharacterSet с разрешенными символами
#116
Closed
tranina-olesya
closed
3 years ago
tranina-olesya
commented
3 years ago
Что сделано
добавила CharacterSet в котором можно указать те символы, которые можно вводить в поле
добавила свойство pasteAllowedChars
если оно true и мы вставляем строку, в которой есть запрещенные символы, они обрежутся, останутся только разрешенные
если false, ничего не вставится
не стала делать enum, уж больно сложно получалось с pasteOverflowPolicy
там и так все переписать пришлось 🙃
про тот
баг в textView
, когда при изменении текста в shouldChangeTextInRange, буквы автоматически становятся большими:
добавила несколько проверок, чтобы код textView.text = text не вызывался без лишней необходимости
вроде больше не видела его
но скорее всего он так и остался, просто теперь найти сложнее, но он в целом довольно странный, чинился после передвижения курсора
кто знает, что там внутри
добавила немного кода в пресеты, чтобы было поудобнее менять и проверять
Что сделано