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
1
vote
1 answer

UITextView Delegate shouldChangeTextInRange (or any over) doesn't get called

I need to track changes in my UITextView method (actianly for limiting number of lines), but none of UITextViewDelegate methods are being called when editing in UITextView begins. Not even - (void)textViewDidChange:(UITextView *)textView; I dont…
justas wza
  • 41
  • 1
  • 7
1
vote
0 answers

iOS UITextView content offset and bounds origion change after changing text programmatically

I have a UITextView. The text in the view keeps changing based on user action. On many occasions, the text is too large to fit and so my text view (which has a desired fixed width and height) scrolls the text. The control flow is something like…
XConfusion
  • 345
  • 1
  • 4
  • 13
1
vote
1 answer

UITextView indentation with text styling

I am using selectable UITextview to display my multiline message, i need to output my message in below style. I can able to add numbering based on the newline character(\n) but the text position is starting from the beginning for remaining text,…
Suresh
  • 1,199
  • 2
  • 12
  • 36
1
vote
0 answers

Displaying UITextView text in multiple lines when the keyboard is in focus in iOS

I have a requirement to allow the user to enter text in UITextView in multiple lines but when the keyboard is dismissed, we have to display the text in single line. Now, when the user taps on the UITextView,I need the text to be displayed in…
Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75
1
vote
1 answer

How can I prevent UITextView from resetting its height on a double tap?

I have a UITextView that takes up the entire screen. When the user taps on it and the keyboard is displayed, I want the UITextView to resize so that it only takes up the space not filled by the keyboard. Otherwise, some words will always be…
Hiro P.
  • 122
  • 7
1
vote
2 answers

settext to uitextview app crash - ios sdk

I have created UITextView programatically, textview is created as required but when i try to set value for textview using tag application crashes. I am able to set other parameter like setUserInteractionEnabled without issue. following the code for…
Satish
  • 1,012
  • 2
  • 15
  • 32
1
vote
1 answer

UITextView content changing position while increasing height

I am trying to change the height of a UITextView based on the size of its content using textViewDidChange delegate call. But text is pushed up a bit while the first line is entered and is corrected to old position when the next line is entered, This…
Jeswin
  • 238
  • 1
  • 3
  • 16
1
vote
1 answer

limit number of characters user may enter into multiple UITextViews

In some sense this question has already been answered at Limit number of characters in uitextview. But my particular case is that I have more than one textview in the same ViewController. So I am not sure how to fix that problem. Say I only have two…
learner
  • 11,490
  • 26
  • 97
  • 169
1
vote
3 answers

iphone setting UITextView delegate breaks auto completion

I have a UITextField that I would like to enable auto completion on by: [self.textView setAutocorrectionType:UITextAutocorrectionTypeYes]; This works normally, except when I give the UITextView a delegate. When a delegate is set, auto complete just…
WoodenKitty
  • 6,521
  • 8
  • 53
  • 73
1
vote
3 answers

Inserting Text in new line without removing the previous text in Text View in iOS

I am trying to Insert Text in new line without removing the previous text in Text View. I am very new in iOS so I am faciing little difficulty to solve this problem. Thanks in advance
user3696707
1
vote
2 answers

Can Subclass use a delegate method of superclass Ios

Is it possible to use a delegate of superclass on subclass Example: Class A is superclass of class B and superclass A uses the text view method example textviewDidChange. can I somehow call [super textViewDidChange] of superclass A on Subclass B…
Aragunz
  • 511
  • 5
  • 18
1
vote
1 answer

How to redraw the keyboard of a UITExtview when i change return key type when already displayed

In a UitTextview, i want the keyboard return key to operate like a newline key when user is typing, and i want the same key to turn to a Done key after few seconds of inactivity and dismiss the keyboard when touched instead of inserting a…
DenisD.
  • 23
  • 4
1
vote
1 answer

textView:shouldChangeTextInRange:replacementText: returning NO, but autocorrect ignores?

I'm having the following problem, and am not sure if this is an iOS bug, or I'm misunderstanding UITextViewDelegate callbacks. I'm able to reproduce this behavior on my device (iPad retina) and on the simulator only if I use the software keyboard…
James J
  • 6,428
  • 6
  • 35
  • 45
1
vote
1 answer

UITextView contentSize automatically decreases

I have a UITextView whose height I am trying to resize as the number of lines increases. Apart form this, I need to resize the UIView in which the UITextView is contained. I am using the following code for this: -(void)…
Rameez Hussain
  • 6,414
  • 10
  • 56
  • 85
1
vote
1 answer

UITextView prevent apple's automatic changes

When editing a UITextView, Apple inserts the following edits for the user automatically 1) A ". " when a user double spaces after a word. 2) An extra space deleted when a whole word is a selected and deleted. EX "My string" with "string" selected…
roozbubu
  • 1,106
  • 4
  • 14
  • 30