uitextfield

Prevent word wrap with UITextView

Hi,using Iphone sdk 3.1.2 I have a UITextView control with vertical and horizontal scrolling enabled. I want every line of text to display without wrapping so that the user can scroll horizontally to see it. The issue I have is that even with horizontal scroll enabled, the text wraps at the width of the iphone screen i.e.320 pixels. H...

iPhone SDK: how to get the value of a UITextField in an alert?

I'm really new at this. I've been working my way through a couple of "HelloWorld" type tutorials that basically have a text field, a button, and when you click the button it alerts whatever's in the text field. I've gotten as far as getting an alert to show and being able to set the title, message, and button text directly. However my at...

Cast an Objective C UITextField value to float

I have a UITextField called txtDiscount It has a value in it: txtDiscount.text == 2.3 //for example I've tried: float test = (NSNumber *)txtDiscount.text; And it compiles, but at runtime breaks down. Unacceptable type of value for attribute: property = ..."; desired type = NSNumber; given type = NSCFString; value = . How can I ...

How do I solve the UIControlContentVerticalAlignmentCenter blurry text problem.

If I set a UITextField to UIControlContentVerticalAlignmentCenter, the placeholdertext is kind of blurry. Any suggestion? Thanks for the help :) ...

Phone Call from UITextField

Hello people, how can i make a phone call from a textfield that is filled with a telephone number? greetz Marco ...

Simple example of CALayer usage -- perhaps in a UITextField

Hi, I have an requirement to implement a custom keyboard for a Cocoa Touch data entry screen containing multiple UITextFields. I've built the keyboard, and everything is working except now I need to figure out how to implement a blinking cursor. (When you disable the UITextField's built-in keyboard, you lose the cursor as well). In googl...

Method to phonecall from UITextField

Hello community, i have a problem. I have implemented an UITextField that contains a phonenumber, then i have implemented the following method to call the phone number: - (void)rufeAn{ NSString *prefix = (@"tel://"); UIApplication *app = [UIApplication sharedApplication]; NSString *dialThis = [NSString stringWithFormat:@"%@%@", prefix, ...

Error when pressing back button

Hi, I have a navigation based app with views that allow edit of text fields if I click on a text field and then press the back button before the done button I get. CoreAnimation: ignoring exception: * -[CALayer setContactTelephone:]: unrecognized selector sent to instance 0x3c2f280 by textFieldDidEndEditing method does run, it attemp...

Add integers from 5 UITextFields to a UILabel in Cocoa Touch

I'm trying to sum the integers from five UITextFields and post them to a UILabel. This is the code I have tried, but it doesn't work properly. The number that shows up in the label is not the sum of my textfields. I have also tried to post to a textfield instead of a label, with the same result. No errors or warnings when I build. int ...

How to open the keyboard automatically on UITextField ?

Hi I have a very simple table and when tocuh a cell it opens a new view with one UITextfield. All I want is that the keyboard will automatically opens, without the user have to touch the UITextfield. Its all done in Interface Builder, so I am not sure how I do this. I guess I need to set the focus at some point ? Thanks ...

iPhone UITextField Keyboard Space Switching Layout

I want the user to be able to type in only numbers and spaces. I set the keyboardType textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; but if a user hits space, the keyboard layout switches to letters. So the user has to switch after each space to the number layout which I want to stop. I know I can stop entering any space...

How to create a UITableView with editable components?

Hi I was wondering how to create a UITableView with editable components. If you look at the network settings in the iphone, where you can enter the static ip address, etc. How to do this ? Thanks ...

IPhone UITextField not showing edit caret or clearing placeholder text when tapped

I have a window within an iPhone application, which is displayed modally to allow the user to enter their settings for a web service upon 'first run'. The text fields have helper text set, and when you tap them the keyboard shows and allows you to enter text. Unfortunately the text fields do not clear the helper text, show the edit ca...

Why is presentModalViewController hindering UITextField responses?

Any uitextfield I add to a view which is presented from another view controller with presentModalViewController:animated: does not respond to any touch events (like the keyboard doesnt display when the uitextfield is tapped) also if i use [textField becomeFirstResponder] to force the keyboard to display, the only time this works is in th...

How to tell a UITextField to use the NumberPad Keyboard in code ?

Hi I created a UITextField in code, now I have now idea how to define the keybaord that should appear ? I just get the standard keybboard, but I need a numberpad ?! Thanks ...

iPhone - Keyboard hides TextField

I am using UITextField to receive user inputs. However, since my textfields are towards the middle/bottom of the nib, it gets hidden when the keyboard pops up. Is there any way sort of slide it along with the keyboard so that it's on the top of the keyboard during selection? Also, since I am also using the numberpad, is there an easy way...

when you resign a uitexfield keyboards first responder is it simulating hitting the return/done button?

Basically i have a uitext field that adds a string to an array when you hit the done button of the keyboard (or hit the'+' button next to the field), which I think is the behavior to be expected in the ui by users, however if they choose to close the keyboard by touching the big button behind everything that will also resign the first re...

Custom Numbers & Punctuation Keypad for UITextField

Hey guys , I am using a Numbers & Punctuation Keypad for the UITextfield , I want the user be able to use only the follows keys : 1. Numbers 2. Decimal / Dot /Period 3. Done / Return Key I want to disable all the characters as well as the Spacebar , how can I do that ? Well I could have used the Number Keypad but then how am I suppo...

Is it possable to change the frame of a UIAlertView

I want to move a UIAlertView's frame because I am adding a UITextFied to it and when the keypad is hiding the Cancel and Ok buttons that are apart of my alertView ...

iPhone - textField in a tableViewCell - Scrolling off screen clears the value

I have a textField inside a tableViewCell. I recently noticed that if I enter a value in the textBox, and then scroll the cell off the screen, the value in the textbox disappears. I have a safeguard against this. If there is no UIKeyboard present, the tableView can't scroll far enough to have to redraw the cell. However, some users d...