Hey
As I'm getting a bit better and understanding some things more and more. I'm in this situation where I want to add new strings to my tableview.
So I've setted up everything, and made an addViewController with a textfield etc. When someone presses the button this will be the Action:
and at the beginning, i init my array plist:
But it seems to not write the file ? What am i doing wrong ?
Grz
As I'm getting a bit better and understanding some things more and more. I'm in this situation where I want to add new strings to my tableview.
So I've setted up everything, and made an addViewController with a textfield etc. When someone presses the button this will be the Action:
Code:
-(IBAction)doneKnop:(id)sender{
NSString *myString = vraagVeld.text;
[arrayData addObject:myString];
[arrayData writeToFile:@"opties.plist" atomically:NO];
[[self navigationController] popViewControllerAnimated:YES];
}
and at the beginning, i init my array plist:
Code:
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"opties" ofType:@"plist"];
NSMutableArray *data = [[NSMutableArray alloc] initWithContentsOfFile:path];
self.arrayData = data;
}
But it seems to not write the file ? What am i doing wrong ?
Grz
Last edited: