I am new to iphone development and I am currently working on a simple application that no one has touched in the iphone market that I know of...
However... I cannot find anywhere in my book or anywhere in forums on websites that gives a straight forward walkthrough of how to save the state of the Text Field or Text View when the user leaves...
I have seen people talk about NSString etc but then they give no additional information on HOW to implement the code into .h, .m or delegate parts of xcode...
please help me as I am eager to get through the coding part of my app and perfect the appearance...
PLEASEEEE HELP!!
also... if anyone knows of how to change the font and/or size of a View Field it would me much appreciated...
Spend some time looking over the documentation for both UITextField and UITextView. They both have a 'text' property that you use to both set and retrieve a text value. Ex:
Open your view controller .xib file. It will open. In Interface Builder, drag the text field into the view. Then, right click or contol-click "File's Owner" and drag the line to your text field. Select myTextField (this is the name of the text field we declared in the header file.) Then drag a button into the view. Change the button's title to something like Save.
Here, when the user hits the button, the text they entered into the text field is saved into the user defaults. Good place to store random info. What about when you need to retrieve this info?
Spend some time looking over the documentation for both UITextField and UITextView. They both have a 'text' property that you use to both set and retrieve a text value. Ex:
Open your view controller .xib file. It will open. In Interface Builder, drag the text field into the view. Then, right click or contol-click "File's Owner" and drag the line to your text field. Select myTextField (this is the name of the text field we declared in the header file.) Then drag a button into the view. Change the button's title to something like Save.
Here, when the user hits the button, the text they entered into the text field is saved into the user defaults. Good place to store random info. What about when you need to retrieve this info?