uitextfield

UITextField Being Non-Compliant Crashes App

Hi Everyone: I have a very simple class (shown below), however every time I run it, it returns: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key field1.' I am drawing this nib file to the screen in the following way: UIVi...

UITextField in a tableView and disposing numeric keypad

I have a table view with each cell having a text field accepting numeric values only. I added the custom decimal place to the default numeric keypad, for my purpose. Since there is no "Done" button to dispose the keypad, I added a button over the table view. The button's background's opaque value is set to zero. The button is hidden when...

UITextField Crazyness

so here's the abridged code: - (void)viewDidLoad { [super viewDidLoad]; currentLocation = [[UITextField alloc] init]; currentLocation.delegate = self; ........ } -(void) setState:(NSString *)state andCity: (NSString *)city { //currentLocation.text = [NSString stringWithFormat:@"%@, %@",st...

Can I set the insertion point on a UITextField

I have a UITextField that I want to present to the user with a pre-filled suffix. Obviously, I'd like to have the insertion point set to the beginning of the pre-filled text. It doesn't seem obvious to me how to do this (there's no insertionPoint property), but is there a tricky way to get this done? ...

Pressing UINavigationController back button while typing.

I recently discovered that if a UITextField is being edited in a controller that's attached to a UINavigationController and the back button is pressed, upon returning to this controller, the DidBeginEditing function is called again and the UITextField keyboard is brought back up. I was wondering if there's a way to stop the keyboard from...

Putting a readonly title in a UITextField

How do I put readonly text inside a UITextField. For example, the "Name" and "Security" fields in the iPod touch "Other networks" settings contain, respectively, the words "Name" and "Security", with an editable area to the right. UITextField has a "placeholder" property but that disappears as soon as I type. ...

How to prevent UITextField to add phrase end point ?

When you type "aa" space space UITextField auto correct the text as "aa. ". I don't want the end point and cannot find how to prevent this behaviour. I tried UITextAutocorrectionTypeNo with no success. Anybody have a solution ? Thanks ...

Accept autocorrection after input

My user enter a text in a UITextField then press a UIBarButtonItem to confirm. If there's a autocorrection suggestion when the user tap the UIBarButtonItem, it is not accepted. How do I accept it programmatically? ...

resignFirstResponder when tapping UITableView?

I have a UITableView with two custom cells and each of them has a subview with a UITextField inside it. I have tried adding a UIButton on top of the UITableView and have it resignFirstResponder but that just means you won't be able to tap anywhere else - not even on the UITextFields to enter text. How do I make it so if I tap outside th...

How to find out what UITextField caused a UIKeyboardWillShowNotification?

I am trying to use a customized keyboard in my application, but I am hitting problems when trying to restrict it to one particular UITextField. I based my code on this Xcode project (originally found on this blog). That code adds a custom UIButton (representing a 'decimal point') into the UIKeyboardTypeNumberPad keyboard view. It does...

Custom UITextField/UIButton

What I'm trying to do is replicate the NSTokenField like UITextField seen in the Mail app and Messages app (type a contact and it comes up with suggestions). I've got the autocompleting working perfectly, when you type in a UITextField, a UITableView pops up showing any matches that it can find in an array, when you click one it adds it...

Managing UITextField.text property

Well, I have a UITextField. Inside it is a property UITextField.text. Is it ok to do: // Assume we have UITextField * tf somewhere.. // now set its text.. tf.text = [ [ NSString alloc ] initWithUTF8String:"Init'd with utf8" ] ; My problem with this is memory. What happens to the old value of the UITextField's text property. Don't ...

UITextField ellipses

I have a UITextField but when it overflows I want it to scroll not use an ellipses. Can you do this on the iPhone? ...

why does the uitextfield never return nil when it becomes first responder?

when i make my textfield become first responder, the text field never returns nil, even if i force it to be nil by myTextField.text = nil; as soon as i comment out the "[myTextField becomeFirstResponder];" the text field is able to return nil. anybody have any idea why? ...

Programatically Select all text in UITextField

How can I programatically select all text in UITextField? Thanks! ...

UITextField Memory Leak

Hi, In my code, there is an memory leak, when the Keyboard appears for the first time when I am about to enter values in the UITextField. Can someone please give me some idea about this. In the Interface File IBOutlet UITextField *userEmail; @property (nonatomic, retain) IBOutlet UITextField *userEmail; Implementation File @synt...

Can't reassign value to text field the second time

The code below when it 1st load, i assign a pageName for selectedIDtext for it. And when the second time it loads I wanted to remove the data init and update with a new pageName. But no matter what I did i can't change and assign the 1st value that was loaded in the textfield. selectedIDmc=new MovieClip(); selectedIDtext=new TextField()...

iphone - Get dynamically created UITextField by tag

I add a UITextField to a table cell dynamically in my app. I'd like to implement a "backgroundClick" method to dismiss the keyboard if the user presses outside the textfield (and outside the keyboard) but I'm unsure how to get a handle on the active keyboard in the backgroundClick method as the dynamic UITextField does not have a defined...

Telling a UITextField to become first responder while embedded in a UITableViewCell

I have a UITextField that is a subview of a UITableViewCell. When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I am trying: [myTextField becomeFirstResponder]; This returns NO all the time, regardless of when it's called, which according to the doc...

self.delegate = self; what's wrong in doing that?

Hi, self.delegate = self; what's wrong in doing that? and what is the correct way of doing it? Thanks, Nir. Code: (UITextField*)initWith:(id)sender:(float)X:(float)Y:(float)width:(float)hieght:(int)textFieldTag { if (self = [super initWithFrame:CGRectMake(X, Y,width, hieght)]) { finalText = [[NSMutableString alloc] initWith...