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

iOS 5 SDK UITextView limitation / bug?

I have a UITextView with a lot of text in it. When the subview containing the UITextView is shown the UITextView only appears after the UITextView has been touched and scrolled. Is there a limit of how much text can be in a UITextView? Or is this a…
OscarTheGrouch
  • 2,374
  • 4
  • 28
  • 39
0
votes
1 answer

Is it possible to make UITextView inactive (editable = NO) without hiding the keyboard?

I use a UITextView in a subclass of UIViewController which I've named FacebookPostViewController. So the purpose of the text view is to allow the user to review the content of a prepared post, possibly make changes to it, and then decide if the text…
Tafkadasoh
  • 4,667
  • 4
  • 27
  • 31
0
votes
2 answers

Shifting UIView while UITextView is editing

I have a big comment field, which is a UITextView. Since the keyboard appears, and the UITextField is nearly half of the whole view, users can hardly see the field. What I want to do is when the keyboard appears, (i.e. the UITextView is editing) I…
Bartu
  • 2,189
  • 2
  • 26
  • 50
0
votes
1 answer

Limiting UITextField to a certain character range

Can someone help me figure out an easy way to limit the UITextField range, so that the entered number is between 14 and 70, and if the number is greater or less that the one inside the range, the textfield would just clear itself? I have already…
Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120
-1
votes
1 answer

How can I prevent a self-sizing UITextView from growing past a specific point (keyboard top anchor, e.g.)?

I have a UITextView, which automatically grows according to the user's text input. I'd like to prevent the UITextView's bottom anchor from going under the keyboard, or I'd like to autoscroll the view itself as the user inputs text which makes the…
user15688965
-1
votes
1 answer

UITextView User Input Text Validation in Swift 4 or Swift 5: Restrict the specific characters in Swift

Need help on how to do a text input validation to a UITextView. Many help is there for UITextField, but I can't find the right solution for this textView input validation. My expectation is to a UITextView needs to accept only these…
-1
votes
1 answer

What is difference between the return value of the method named "textFieldShouldReturn(textField:)"?

I have doubts when i implement the delegate method textFieldShouldReturn of UITextField, I don't know what's difference between the return value. I have tried return false and return true in it, but I didn't find the difference between them, and my…
ML.Chowzzz
  • 35
  • 9
-1
votes
1 answer

UITextView in UITableViewCell fail to be assigned its delegate for the first time in `textViewDidBeginEditing` method

Original post: As suggested from the title. I have made sure that when the cell is initiated in the cellForRowAt method, the cell's textview will be assigned a delegate from within the method. In fact, there is another text field in the cell, and it…
qsmy
  • 383
  • 3
  • 14
-1
votes
2 answers

How to change the starting cursor position inside UITextView

I have a uitextview which become the first responder on viewload. but i want to change the position of the cursor of the uitextview at certain position in x for the first 2 line only.
Gaurav Parmar
  • 447
  • 2
  • 11
-1
votes
2 answers

UITextView insertText call shouldChangeTextInRange: replacementText:

I have a UITextView. I have the delegate for myTextView set to self and, when I do normal editing, this method calls just fine: - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { …
Cody Winton
  • 2,989
  • 5
  • 25
  • 48
-1
votes
3 answers

iPhone: textViewdDidBeginEditing: textview.tag always 0

In my application, I've written a cycle to assign tag to my textviews: for(j = 0; j<9; j++) for(k = 0; k<9; k++) { UITextView*txtview = [[UITextView alloc]initWithFrame:CGRectMake(x,y,25,25)]; txtview.backgroundColor =…
charles
  • 713
  • 1
  • 6
  • 16
-2
votes
4 answers

Xcode 9 TextViewShouldReturn

In the past, to dismiss the keyboard after a user hits return I would simply override the TextViewShouldReturn function. However, upon re-downloading Xcode (version 9.3.1) it seems it is no longer a function within UITextViewDelegate and most all…
Studwell
  • 115
  • 10
-2
votes
3 answers

if/else statement not being executed in UITextView delegate method

I have a if/else statement in my objective-c code. The if/else statement runs like this: -(void)textViewDidBeginEditing:(UITextView *)textView { if(textView==self.heardTextView) { NSString *string = textView.text; if…
-2
votes
3 answers

Destroy placeholders in 2 UITextViews

I have 2 UITextViews on a single View Controller. They have placeholders in each and I'm trying to get the placeholder to disappear when the textViewShouldBeginEditing. I've tried using tags, but the first one will work, then each selection after…
TomG103
  • 311
  • 2
  • 26
-4
votes
1 answer

Swift code that will print a string of all the characters of a new word typed in a UITextView as they are being typed

I need help with swift code or function that will run in the body of UITextView function textViewDidChange that will print a string of all the letters of a new Word as they are being typed in a UITextView control. So if I have a UITextView…
1 2 3
14
15