uitextfield

iPhone UITextField within TableCell blanking out

In my iPhone app I have a settings page where a user can enter text into multiple TextFields. The text fields are all cells within a table. The problem I'm noticing is that when a field scrolls off the phone's screen it loses the value currently in the text field. I notice Apple's apps always have you click on a field to edit it, whic...

iPhone Keyboard Covers Text Field

I have an app where, in Interface Builder, I set up a UIView that has a text field near the bottom of the view. When I run the app and try to enter text into that field, the keyboard slides up overtop of the field so I can't see what I'm typing until I hide the keyboard again. Has anyone else run into this problem and found a good way...

UITextField blurred text

I am having a problem with a UITextField's text being blurred/anti-aliased even with a standard font size. The text will appear crisp when the control is the first responder, but blurred again when it loses focus: Does anybody know how to fix this? ...

Drop Shadow on UITextField text

how is it possible to add a shadow to the text which is in a UITextField? ...

How to make a UIButton cause a UITextField to begin editing text

Hi. I have a custom field that allows the user to enter text in a UITextField. To the left of the UITextField is a UIButton. Something like this: ENTER YOUR NAME: [name input field] In the about the UIButton has the text "ENTER YOUR NAME:" and the UITextField is the [name input field]. When the user taps the UITextField, the keyboard...

Elegantly replace iPhone keyboard with UIPickerView

I have a table view that has embedded UITextFields for entering some data. It also has two other fields that popup a UIPickerView and a UIDatePicker - as demonstrated in the DateCell example from Apple. Mostly it works but I can't figure out how to cleanly transition from the text field keyboard to the other pickers - one slides out, o...

UITextField "Adjust to Fit" doesn't change size

I have a UITextField inside a TableViewCell where a player enters their name. I have limited space (78 units) for the control. I'd like the font to be as large as possible (Helv 16) for easy readability but also scale down for longer names. (min size 8) I thought that "Adjust to Fit" in Interface Builder would do the trick but alas it...

iPhone restrict user from entering space in textfield

hi , i want to restrict user from entering space in a UITextField. for this i m using this code - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { if ( string == @" " ){ UIAlertView *error = [[UIAlertView alloc] initWithTitle:@"Error" message:@"You hav...

Is there an iPhone equivalent to the NSTokenField control?

Hi there, In my app I want the user to type names into a UITextField (or equivalent) and then when they press return, it will put that word(s) in a blue bubble that's usually associated with tags. The cursor then moves to the end where they can add more "tags". This can be seen when adding contacts in the To, CC & BCC fields in the Mai...

Trying to run a simple app with UITextField - Simulator is crashing

I have two UITextFields in the App as IBOutlets and I have made a connection from File's Owner to these ... When I run Build and Go, the iphone simulator crashes ... and in the console (after debugging) ... its showing me following ... 2009-08-22 18:11:40.869 Control_Fun[1138:20b] *** Terminating app due to uncaught exception 'NSInterna...

Insert string at cursor position of UITextField

Hello, I've got a few UITextFields in an UITableView. The user should be able to insert only numbers and dots. To do this, I set the keyboard type to UIKeyboardTypeNumberPad and added a '.'-Button at the bottom left corner. Every time the button is pressed, a function is called. This function should insert a dot at the current cursor pos...

Creating pin-code dialogue

I would like to create a pin-code dialogue, like the one you can switch on on the iPhone. For those who have not seen it, it consists of four boxes and a number keypad. When you enter a digit, a dot appears in the first box. And so forth. When you hit the delete button, the last dot is removed. I have this set up as four UITextFields a...

Placeholder in UITextView

Hi all! I'm making an application which uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can set for an UITextField. Does anyone know how to do this? Thanks in advance. ...

iPhone UITextField - Change placeholder text color

I'd like to change the color of the placeholder text I set in my UITextField controls, to make it black. I'd prefer to do this without using normal text as the placeholder and having to override all the methods to imitate the behaviour of a placeholder. I believe if I override this method.. - (void)drawPlaceholderInRect:(CGRect)rect ...

UITextField text field does not set

I'm trying to update the username field for a textfield. Currently there is a place holder which has "Username" written in it. I am loading the username from a settings file but for clarity I will just hardcode in the username. - (void)viewDidLoad { settings=[Settings new]; [settings loadData]; //username.text=settings.use...

Make the keyboard appear for my custom UIView

Hi there, I have a UIView subclass and I want the keyboard to appear when it is the first responder (so a backspace can be detected to "delete" the view). I have tried making my UIView subclass adopt the UITextInputTraits protocol but it seems that's not enough to make the keyboard appear. How can this be done? Or is it only possible fo...

How to verify input in UITextField (i.e., numeric input)

Hello all, I am fairly new to iPhone development and I have what seems to be a simple question that I cannont figure out. How can I verify that a user input a number and a decimal into the text field? I have tried many different things but the closes I can get only allows for numeric strings of the form: 5.34 or 23.89. I need it to ...

UITableView with TextField and moving the view when keypad comes up

I have a UITableView that contains text field in each row. The text field is allowed to take only numbers and decimals. I have a transparent background button to help users click on the view to dispose the keypad when it is up. The text fields at the bottom of the view are getting covered by the keypad, so I wanted to move the view by ca...

Getting around the limitations of iPhone's UITextField

I have spent a few days trying to get around the limitations with UITextField, namely no text wrap and number of lines. I have created a UILabel, which is used to display the text entered in UITextField and does all the formating stuff properly. The UITextField is hidden and the user sees all the texted entered only in UILabel as it's be...

How to hide the keyboard while using TableView in Iphone?

Hi, In my application I have textfield and while inserting any values in it it is displaying according values to the tableview as the no. of rows. I want that when I scroll on the Tableview with having so many filled rows ,the keyboard must be hidden at the time of scrolling. I have search on the net,but unable to find out the solutio...