uitextfield

iPhone: Jump to next uitextfield in uitableview, how to?

In my iPhone project I'm using a UITableview with UITableViewCells containing UITextfields. I have seen in many apps that it is possible to use a next button to jump to the next textfield in the next cell. What is the best way to accomplish this? My idea is to get the indexPath of the cell with the textfield that is being editing and t...

How do you change the link color in a UITextField?

Anyone know how to change the link color or the phone number color in a UITextField? It's nice that the detection option automatically changes the color of these things to blue and underlines them. But come on, fluorescent blue? Really? OK, it looks fine on a white background, I guess. Wishful thinking ... textField.linkColor = [UIColo...

Adding subviews to UITextField leftView property

I am trying to implement an autocomplete text field for the iPhone/iPad. I have subclassed a UITextField. As a user enters search criteria, if the search string matches some entity in our database, then that entity becomes part of the user's search criteria and I want to append a button representing that entity to the leftView property...

Keyboard view is obscuring UITextField in landscape mode

Note: this happens prior to any of the UITextFields being pressed (e.g. the keyboard hasn't yet appeared in the View) I've created a simple view with 3 fields 1 of which appears above where the keyboard would appear, and 2 which appear below. Loading it into a ViewController works fine until I come to try to click on the 2 UITextFields...

How to make an scrollable UITextField Inside UItableViewCell?

Hello everyone. I created a bunch of editable UITableViewCell by embedding an UITextField inside, but I have seen some apps that allows you to scroll the UItableview by scrolling inside an inactive editable cell. How can I do that? And how can I also dismiss the keyboard when tapping somewhere else? I know about the method: - (void)touc...

UITextfield is becoming focused after UIButton pressed

I have a UITextfield for entering text. A button triggers a functionality. After completion of the IBAction the UITextfield is getting focused again. After the IBAction I want to keyboard to disappear. What happends now is that due to the IBAction of the button, the keyboards disappears (I'm showing a UIAlert) and after the IBAction the ...

iphone sdk - problem pasting into current text location

Hi guys I'm trying to paste text right into where the cursor currently is. I have been trying to do what it says at: - http://dev.ragfield.com/2009/09/insert-text-at-current-cursor-location.html The main deal is that I can't just go textbox1.text (etc) because the textfield is in the middle of a custom cell. I want to just have some te...

Clear UITextField when standard number pad is pressed

Hi all, I'm sorry if I didn't explain my problem well enough in the title. In my application, I'm using a small subview to create a very basic calculator on the top side of the screen (I just have an UITextField to show the operations and two buttons). Instead of using a custom keyboard for it, I want to use the standard iPhone number...

Disable button until text fields have been entered?

I have several uitextfields within a view and I would like to disable the uibutton until all the fields have something entered into them. What's the best way of doing this? Ideally, I'd like to do some basic validation (make sure all entries are numbers) too. EDIT Couldn't get the solutions below to quite work. Below is the version ...

How do I prevent my table cell's textview from being editable after editing is done?

So this is an interesting problem. I have custom tableviewcells that include a text field. When In my cellForRowAtIndexPath I have an if statement that determines whether or not the cell's text field should be editable- it looks like this: (self.isEditing) ? [infoCell.textField setEnabled:YES] : [infoCell.textField setEnabled:NO]; Thi...

Instantiate UITextField delegate programatically?

I have a UITextField that has been added to my view in Interface Builder. My question is: is there a way I can programatically set its delegate from within Xcode? I know that I can connect up the delegate in IB by dragging a connection from UITextField>Delegate to my viewController which implements textFieldShouldReturn: Just curious as...

How can I scale the height of a UITextView to fit a changing amount of text?

I created a nib for a specific view I have. The view has a text field that may change height depending on the amount of text in the view's "represented object". For example, a blog post screen would have to handle different amounts of text as blog posts are not the same length and you obviously only want one nib to represent all blog p...

How to do a line break for a UITextField?

I am storing text in an SQLite database and one field looks something like this: "blah blah \n\n blah blah" However, when I display the text using a UITextField, my app actually displays the "\n" and doesn't break the line. Anyone know what I am doing wrong? Thanks ...

How to highlight text automatically inside an UIAlertView text field

Hello everyone I have an UIAlertView with a textfield that shows a default value and two buttons, one to cancel and the other one to confirm. What I am trying to do is that when the alert view is popped up the default value is highlighted so the user can override the whole value faster than manually erasing it. - (void)tableView:(UITabl...

enabling the "return button" in a UITextField keyboard (objective-c/iphone)

When I start editing a UITextField, I have the "Clear When Editing Begins" option checked so it starts off with no text. However, the "Return" button is grayed out until you type at least one character. I've seen other iphone apps where the "Return" button is not grayed out (and if you press it with no text, then it goes back to what th...

iPhone: UITextField inside TableView cell?

I am trying to programatically add a UITextFiled inside one of my tableview cells. How would I do this? Assuming it is in the following method, what code would I use? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableView...

How to make the Number view in keyboard UITextField to become default?

I have a UITextField but my users will prefer enter some number in that field rather than typing text character (like enter a cost a product). So, how can I make the Number View in the keyboard to become default whenever the user tap into the UITextField? ...

UITextField stopping shake event?

For those of you who work graphically, here is a diagram of the view hierarchy: Root View -> UINavigationController -> UITableView -> Edit View -> Problem UITextfield Basically, - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event; gets called in my Root View when the device shakes. When a user taps on the "edit" ico...

How to push text from one UITextfield to another UITextfield in the next View? And back!?

an Hi, I have an UITextField in one view, UITextField A in View A. And I have another in view B, UITextField B in View B. I use a Navigation Controller Bar to switch between the views. The UITextFields are properties and connected Outlets of both views A and B. On my view A there is an "Options"-button which pushes view B. So when you...

How to force a textField to become editable?

I guess my description is not clear enough. So I'll try again: Imagine there is a ViewController, called Picture, that display two lines, Title and Description. In case the user tap one of the rows a new view controller is displayed, either Title or Description view controller. Each of these view controllers (i.e. Title or Description)...