0

I have a custom framework for UITextField. For now, I want to disable two attribute as the question above but still keep the cursor show in my custom textfield. I already disable the keyboard with set the inputView = UIView(), and that successful for hide the keyboard even show the cursor inside textField.

Check out the image below.

My goal is disable both attributes like above or another for can not Select All action from my textField, but still keep the cursor available anytime.

Hope to hear the ideas from you guys. Thank a lot!

Huy Nguyen
  • 77
  • 1
  • 12
  • 3
    Put a dummy view above textview with clear color, and show and hide that view. – Bista Jul 31 '18 at 10:50
  • so you want to disable all the options for textfield or selected option? – Devil Decoder Jul 31 '18 at 11:52
  • If you want to show cursor then UITextField isUserInteractionEnables should be true other wise you can't see cursor or you cannot interact with UITextField. If you want any other action like cannot past option we can do it. – Abhishek Jadhav Jul 31 '18 at 12:49
  • Thanks @DevilDecoder, just all of attributes for selecting to my textfield. – Huy Nguyen Aug 01 '18 at 02:31
  • Thanks @AbhishekJadhav, I know that but my meaning is disable all of attributes from textfield to user can not do anythings on that like ```isUserInteraction```, not only one or all of actions from tooltips. – Huy Nguyen Aug 01 '18 at 02:35
  • 1
    Thanks @Bista, sound cheat, but actually it's solved my problem =)) – Huy Nguyen Aug 01 '18 at 02:36
  • check with this: https://stackoverflow.com/a/27047473/2677551 – Van Aug 01 '18 at 06:29
  • Thanks @Van. That just disable tooltips action for textfield, the user still touch and move the cursor as well. – Huy Nguyen Aug 01 '18 at 07:55
  • @HuyNguyen that is waht you expect, right? anyhow the scrolling must be there in case of your text exceeds the bounds of textfield then user should be able to swipe on text to see whole text, correct? – Van Aug 01 '18 at 13:46

0 Answers0