Hi all, i am creating a music application in iphone where i am integrating twitter in my iphone so that a user can listen to a particular song click on the twitter tab ,log in to twitter and post his comment in to twitter.and i need that his username and password should be saved when he click on save username and password button so that he remain logged in when he is in the application.
I have done the code of saving username and password but i get an error indicating that ""FORMAT IS NOT A STRING LITERAL AND NO FORMAT ARGUMENTS""
Here is my code:
-(IBAction)SaveAll:(id)sender{
UsernameString =[[NSString alloc]initWithFormat:text1.text]; "FORMAT IS NOT A STRING LITERAL AND NO FORMAT ARGUMENTS"
[text1 setText:UsernameString];
NSUserDefaults *UsernameDefault =[NSUserDefaults standardUserDefaults];
[UsernameDefault setObject:UsernameString forKey:@"Stringkey"];
PasswordString =[[NSString alloc]initWithFormat:text2.text]; "FORMAT IS NOT A STRING LITERAL AND NO FORMAT ARGUMENTS"
[text2 setText:PasswordString];
NSUserDefaults *PasswordDefault =[NSUserDefaults standardUserDefaults];
[PasswordDefault setObject:PasswordString forKey:@"Stringkey2"];
}
Please help me in solving this problem so that when i click on the username and password button my username and password should be saved.