How do I manipulate textfield variables within an iPhone app? I want to have three text fields, formatted to numbers only, and be able to manipulate the data when I press different buttons.
Any help would be appreciated!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
UITextField objects have a ‘text’ property of type NSString that can be read and written. Keep a reference to the text fields, and when a button is pressed, update the field’s text property with a new NSString to change its contents. If the text fields are not directly editable by the user, you may want to use UILabel instead, which is basically just a non-editable text field (and which also has a read/write ‘text’ property).