Questions tagged [uitextviewdelegate]

A text view delegate responds to editing-related messages from the text view. You can use the delegate to track changes to the text itself and to the current selection.

A text view delegate responds to editing-related messages from the text view. You can use the delegate to track changes to the text itself and to the current selection.

@property(nonatomic, assign) id<UITextViewDelegate> delegate

Available in iOS 2.0 and later.

225 questions
0
votes
1 answer

changin a word format in UITextView from keyboard input when the word begins with @

im triyin to format a word from keyboard input in a uitextfield, func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { let words = textView.text.components(separatedBy: " ") for…
user4812550
0
votes
1 answer

UITextView limit characters and display count left

I'm trying limit the characters for a UITextView to 200. It gets the data from Firebase Database (if it's available), if not - the UILabel that represents the characters left should be hidden - hence, if there's data (text in the text field it…
Dani
  • 3,427
  • 3
  • 28
  • 54
0
votes
2 answers

Custom Views aren't dismissing keyboards?

Have tried [[self jotNotes] resignFirstResponder]; , have tried [self endEditing:YES]; So I have my NoteViewController, which inherits UIViewController, and tries to implement the delegate like so @interface NOTEController : UIViewController…
user286152
  • 117
  • 1
  • 2
  • 12
0
votes
1 answer

Replace text with attributed text and add action to it

I have array of strings [apple,mango,banana,kiwi,orange] while the user is typing on textview if the last word is matched to any of the words in the array it should be underlined and have tap gesture added to it . I am using the func…
Akash Shindhe
  • 558
  • 4
  • 16
0
votes
0 answers

selection of uilabel with NSAttributedString

I want to nightlight text in label when user selects it by tapping on UILabel whole text like shown in picture. Those are appended NSAttributedStrings. example. Hy my name is Mohsin. my age is 22. I am doing development. Requirement : when user…
0
votes
1 answer

UITextView inside of PopoverPresentationController doesn't response to its delegate method

I am having problem making my UILabel to react to my UITextView by changing its textColor. So when there over 250 words in my UITextView, my UILabel will should turn red. But it for some reason doesn't do it. // class NewAppViewController:…
0
votes
2 answers

Swift: Disable bar button for whitespace/newline-only text in UITextView with placeholder text

I have a ViewController with a UITextView and a "Send" bar button item in the navigation bar which submits the text in the textView. Since the UITextView does not support placeholder text like the UITextField, I am handling it on my own with the…
DiligentDev
  • 71
  • 13
0
votes
0 answers

UITextView vertical text alignment when entering newline

I'm having a bad time when vertically centering a UITextView text. When I press Enter or when the text doesn't fit in a single line and goes to the next line, the text doesn't stay vertically aligned until I hit another key. Here are the…
Bryan ORTIZ
  • 306
  • 3
  • 17
0
votes
1 answer

How to clear text inside VENToken?

I have used VENTokenField github library for recipients email. Now the user enter the email and its separated by commas(,). Everything works fine. My question is how to clear the text when user press the submit button. 1)…
Sakthi
  • 71
  • 1
  • 8
0
votes
1 answer

UITextView change selectRange always crash

When user click the passage in textView, I want to change the cursor to the linebreak, but when I change selectionRange is always failed. I know the reason, but I must change the selectedRange in func: …
姜思宇
  • 1
  • 1
0
votes
4 answers

UITextView Changing Size Dynamically

I am using the following code to dynamically adjust the height of the containerView which contains my UITextView func textViewDidChange(textView: UITextView) { let amountOfLinesToBeShown:CGFloat = 6 let maxHeight:CGFloat =…
Alk
  • 5,215
  • 8
  • 47
  • 116
0
votes
0 answers

UITextView set detection is phone number not working in IOS 9

I have UITextView and I set detection is phone number when I long press phone number I need show popup (image below) with ios 8 it's work but ios 9 it's not working?
Lê Trinh
  • 327
  • 3
  • 11
0
votes
0 answers

UITextView is scrolling even when contentSize is CGSizeZero when isEditable and isSelectable

I am editing in UITextView, and do not want it to scroll, but respond to touch events. Even after I have set the contentSize to CGSizeZero, it gets reset to a different frame. Can someone help with this?
0
votes
2 answers

How to make two Classes delegate of UITextView?

I have a textView "TexV" which have a custom class "TexV_Class" inherited from UITextView and I have a viewController "VC" with custom class named "VC_Class" Now how can I make both classes "TexV_Class" and "VC_Class" delegate and make them work…
djay
  • 375
  • 2
  • 18
0
votes
1 answer

How to handle UITextField value change without delegate?

There is a method in UITextFieldDelegate textField(_:shouldChangeCharactersInRange:replacementString:) Which allows me to do it. But I want custom text field handle this automatically to update its state without delegate and I don't want…
mra214
  • 509
  • 1
  • 7
  • 18