Totally lost with this one. Here’s my code:
theColor = [NSString stringWithFormat:@"white"];
NSLog(@"%s", theColor);
Which is returing:
†t†å
I must be doing something stupid, but can not figure it out for the life of me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Change your print to:
Hope it helps.
The thing is that
%sexpects a C-string (char array with a NULL terminator) and you are passing aNSStringinstance which is not the same as a C-string. The modifier you need in a format to printNSStringcontent is%@.