I'm trying to add multiple objects to a plist, from the same UITextField. I explain better. I have an UITextField from which I add a phone number to a plist. The problem is that I can't add more than one number to that plist from only one textfield. This is my code:
NSMutableDictionary *myDictionary;
NSArray *theArray;
theArray = [[NSArray alloc] initWithObjects:textField.text, nil];
myDictionary = [[NSMutableDictionary alloc] init];
[myDictionary setObject:textField.text forKey:addedTime];
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"PhoneNumbers" ofType:@"plist"];
[myDictionary writeToFile:plistPath atomically:YES];
Is there any way to fix the problem ?
Thank you in advance.