iphone - Retaining state of a user variable in Cocoa -
What is the correct way to define a user input variable, so it retains its value after the user returns. I have a textView where the user enters a description, and I want to clear the contents of textview, but to keep the user who is logged in first. Define an NSString in the header of your UIViewController, make your UIViewController a UITextViewDelegate (@interface MyViewController: UIViewController {), and create your own UIViewController.
Set up the representative property of the UITextView. Then, your
- Viewed changes in text (zero) text: (UITextView *) textView
method, set the NSString variable for your UITextView text when the user deletes the focus from your UITextView, Clears the contents, and the NSString variable has been omitted from the text which was written before the clearing.
Comments
Post a Comment