Changes

Jump to: navigation, search
Checking the Data File on Application Startup
Each time the application is launched by the user we need to check to see if the data file already exists (if the user has not previously saved any text the file will not have been created). If the file does exist, the contents need to be read by the application and displayed within the text field. A good place to put initialization code of this nature is in the viewDidLoad method of the view controller. With this in mind, select the FileExampleViewController.m file and scroll down to the viewDidLoad method. Remove the comment markers from around the method and edit it as follows:
</pre>
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {

Navigation menu