Hi, I am creating a method that is run once a user presses a button. The method creates a folder given the name defined by the user and adds a plist to that folder. The problem is that it doesn't create the plist. I know that the code works seperately, but I think that the plist creation is being done before the directory has been created. Is there any way to add a 'wait until' clause? Thanks
- (void) addTheDirectory{
NSString *theTitle = theTitleField.text;
NSString *theDescription = theDescriptionField.text;
//create the directory
[[NSFileManager defaultManager] createDirectoryAtPath:[NSString stringWithFormat:@"%@/%@", DOCUMENTS_FOLDER, theTitle] attributes:nil];
//create the plist
NSMutableDictionary* plistDictionary = [[NSMutableDictionary alloc] init];
[plistDictionary setValue:theTitle forKey:@"Title"];
[plistDictionary setValue:theDescription forKey:@"Description"];
[plistDictionary setValue:@"0.1" forKey:@"LBVersion"];
[plistDictionary writeToFile:[NSString stringWithFormat:@"%@/%@/info.plist", DOCUMENTS_FOLDER, theTitle] atomically: YES];
}