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
3 answers

UITextView double tap to edit

So I have a UITextView I'm using to make a moveable, editable label (My prior searches on SO showed this to apparently be the best option). I need to have the user double tap to enable editing and set it to become the first responder. I can't find a…
Rob
  • 1,045
  • 13
  • 28
1
vote
1 answer

dynamically resizing UITextView width and height

My code dynamically adjusts according to the text. It increases height when we press enter and increases the width unless we press return. But how do I make it - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range…
CalZone
  • 1,701
  • 1
  • 17
  • 29
1
vote
4 answers

UITextView: characters count is not right when the backspace is typed in

I want to show the characters number when I type in a UITextView. But I'm confused when I presse the delete/backspace key. I use: - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text My…
Vigor
  • 1,706
  • 3
  • 26
  • 47
1
vote
1 answer

How to becomeresponder from one UITextView to another UITextView?

I have two UITextView's in my iPhone app. When the user selects one UITextView the controller automatically goes to another UITextView. I have tried the following way in my project. But the second UITextView does not becomefirstresponder until the…
Gopinath
  • 5,392
  • 21
  • 64
  • 97
1
vote
0 answers

Didn't invoke textViewDidChangeSelection when one click and long press a word on UITextView?

If I double-click one word on a UITextView, textViewDidChangeSelection is invoked. However, one short click and then a long press on a word selects the word, but doesn't invoke the textViewDidChangeSelection. How can I invoke the…
1
vote
1 answer

Custom Delegate fo UITextView

I am subclassing UITextView, and i got it working, but i also want to do some extra work when the UITextView Delegate methods are called. here is what i have so far. ThanaaTextView.h #import #import "ThaanaDelegate.h" @interface…
Jinah Adam
  • 1,125
  • 2
  • 14
  • 27
0
votes
2 answers

Want to align the text from the rightside..(UITextALignmentRight)

I created a keyboard using on UITextView's inputView. I want to align the text from the UItextAlignmentRight but it's not working as it is not calling the UITextViewDelegate method when using inputView. Any help will be appreciated.
0
votes
1 answer

How to connect UITextView to a home made keyboard?

I have a UITextView field meant to receive input from a keyboard. But the standard keyboard not being adequate for my app, I built another one with the buttons and characters I need. I would normally make use of the UITextViewDelegate protocol and…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
1 answer

UITextView didChangeSelection not getting called?

I have implemented the UITextViewDelegate in my view Controller, which needs to do something when the text selection changes in textView. So I used textview:didChangeSelection to listen to call back events. It works on the iPhone simulator and iOS5…
0
votes
1 answer

Weird UITextView behavior

I have a UITextView which i create in the code: myView = [[UITextView alloc] initWithFrame:CGRectMake(10,5,220,50)]; myView.editable = YES; myView.font = [UIFont fontWithName:@"Helvetica" size:16]; myView.bounces = NO; myView.delegate = self; I set…
0
votes
0 answers

Create a hashtag in the text view swift

I found this question: I'm implementing a hashtag recognizer in UITextView but it never highlights two words with the same beginning?. By doing that I want to check the user's run time input text on the text view and each time user types a #hashtag,…
Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
0
votes
0 answers

Swift UITextView Delegate

I am having a problem and have searched all across StackO and did not see a solution. I have a UITextview extension with TextViewDelegate that I call inside of my VC so that i can have a placeholder label. The problem is i now need to add a func…
aaron
  • 11
  • 4
0
votes
1 answer

Keyboard not appearing in UITextField and UITextView IOS 15

i am not using storyboard for this application so here's my SceneDelegate willConnectTo function func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { let windowScene =…
0
votes
2 answers

UITextField shouldChangeCharacters in swift is not working for the first letter entered

I have a textfield population phone number. When i am entering phone number i am checking validation for a invalid phone number. i am using delegate method "textfield should change characters".It is working fine but it is not working for the first…
Tapan Raut
  • 850
  • 6
  • 17
0
votes
1 answer

UITextView shouldInteractWith delegate returning value in alert completion

I have a text view inside a table view cell that can contain URLs. When the user taps on the URL, I want to present an alert to ensure the user wants to continue before handling the URL. I'm trying to implement this within the proper delegate…
Jason
  • 808
  • 6
  • 25