您的位置:首页 > 其它

cannot assign to 'self' outside of a method in the init family

2013-07-24 19:30 429 查看
在写程序时遇到这个错误,“cannot assign to 'self' outside of a method in the init family”,在网上查询后,得到了一个很奇怪的正确答案。

我一开始写的initwithCityCode,出现这个错误,在别人的回答中,竟然是把with中的小写‘w’改成大写的‘W’。改过之后一切都好了。太神奇了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐