I have two text box ,I want to store the data of this text box into the Plist when i Press submit. so far i gone through the code to write ,but problem is how to write data of the text box?? like I have textbox1 and textbox2 .want to store data into plist
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Comments" ofType:@"plist"];
NSMutableArray *plistArray = [[NSMutableArray alloc] initWithContentsOfFile:filePath];
NSMutableDictionary *newComment = [NSMutableDictionary dictionary];
[newComment setValue:commentTitle.text forKey:@"title"];
[newComment setValue:comment forKey:@"comment"];
[plistArray addObject:newComment];
[plistArray writeToFile:filePath atomically:NO];
please suggest me the correct way