uitextviewdelegate

Limit number of charchters in uitextview !

Hello All , I am giving a text view to tweet some string . I am applying the following method to restrict the number of characters to 140 in length. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{ if([text isEqualToString:@"\b"]){ DLog(@"Ohoooo"); r...

iphone setting UITextView delegate breaks auto completion

Hi there! 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 stops working. The delegate has only the following method: - (void)textView...

Get text from UITextView

Is it possible to get the first line of text from a UITextView. I have looked through the UITextView and NSString Class References and can't find any methods that could accomplish this. ...

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

Hello, 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 know what Im doing wrong I added UITextViewDelegate method to header file like that...

iPhone: how can I activate a text field programmatically (and not wait for the user to touch it)

I have a UIViewController that is a UITextFieldDelegate, and I would like the keyboard for its text field to appear as soon as the user navigates to this view, without having to actually touch the text field. It would also be nice to be able to "dismiss" the entire view when the keyboard is dismissed. I am loading the view from a xib fil...

iOS4: Can't Programmatically Scroll to Bottom of UITextView

Before I was using this method.... //TextView is a UITextView [TextView scrollRangeToVisible:NSMakeRange([TextView length], 0)]; ...which would programmatically scroll to the end of the UITextView but it doesn't seem to be working in iOS 4.0. Is there a way to programmatically scroll to the end of a UITextView without changing edit...

How to use UIKeyboardWillShowNotification

I want to create a ChatView exactly like iPhone's texting app (Messages). I'm doing it programmatically and am trying to move the textView up with the keyboard. I want to do this in a function that gets called by UIKeyboardWillShowNotification. Could you help me debug this error? In ChatViewController.m, I set a listener for UIKeyboardW...

Insert date/time in UITextView when user hits return

Im trying to Insert the current date/time whenever the users hits the return key or starts typing on a UITextView in Xcode but not quite sure where to start. I know this method is for when clicking into the TextView but doesn't seem to work: - (void)textViewDidBeginEditing:(UITextView *)textView { self.txtDetail.text = [self.txtDet...

Application crashes with UITextViewDelegate

Hi, I'm new to iPhone programming and Objective-C and am having some trouble with my UITextView. I have a view with a text view as its subview. I created a separate class which I want to be the delgate of the text view. In my header for this delegate class, I have the statement @interface MessageTextViewDelegate : NSObject UITextVie...