I am getting this error "stray '\302' in program ", while I am using this following line of code:
[UIButton setAnimationDuration:1.0];
How can I resolve this error?
I am getting this error "stray '\302' in program ", while I am using this following line of code:
[UIButton setAnimationDuration:1.0];
How can I resolve this error?
\302 is an unprintable character which is somewhere in the your code near or on the line that you receive the error.
Just delete al empty, tabs and spaces it should solve your problem.
It’s right here:
` `
Just a joke. If the above suggestion fails you, perhaps opening the file in another editor that allows you to show all nonprintable characters. Perhaps even Xcode has this feature. TextWrangler does if you have no other available.
Things like this happen when you copy/paste code from the Internet. Delete the affected line and retype it by hand in Xcode and the problem should disappear.
In the future, be aware of things like this slipping in to your code.