开发者

error stray '\302' in program on UIButton setAnimationDuration:

I am getting this error "stray '\302' in pro开发者_开发问答gram ", while I am using this following line of code:

[UIButton setAnimationDuration:1.0];

Can anyone tell 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.


Its right here:

` `

Just a joke. If the above suggestion fails you, perhaps opening the file in another editor that allows you to show all non-pritable 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜