newbie xcode user- trying to clear text field with button

Hi. I am trying to make a very simple iPad app which has a text field that I want the user to be able to clear or erase by tapping a button. Is there a way to do this? Basically assign an action that clears all text and starts over? I hope that make sense. All help appreciated.

Posted on Feb 21, 2013 6:59 PM

Reply
5 replies

Feb 21, 2013 7:22 PM in response to donny

[[selftextField] setStringValue:@""];


Assuming that textField is the name of the TextField in your window. (At least this is for OS X, I'm assuming IOS should be the same for something like this).


If this still isn;t clear then with all due respect you need to start with something simpler. There are good tutorials on the Apple site which will walk you through your first IOS (or OS X) app and get you familiar with some of the basics of Objective-C and Xcode.


regards

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

newbie xcode user- trying to clear text field with button

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.