Hey guys im trying to make a tweak where a user presses a PSButtonCell and it opens a UIAlertView that has a UITextField so the user can enter a username and hit save, in the NSLog it shows the input of the user but Im having trouble being able to write the users input into the plist using "kUsername" key. Ive searched all day and night with trial and errors Can anyone help me out?
Here is a snippet of my code that i need help fixing.
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 0){
UITextField *alertTextField = [alertView textFieldAtIndex:0]; //the users input
NSLog(@"alerttextfiled - %@",alertTextField.text);
NSMutableDictionary *login= [[NSMutableDictionary alloc] initWithContentsOfFile:PLIST_PATH];
[login setValue:alertTextField.text forKey:@"kUsername"]; //set user input to key kUsername ?????
}
}