Xcode报错Expected selector for Objective-C and Expected method body

昨天把键盘拿起来拍一下清清灰,然后就发现Xcode报错了,Xcode报错Expected selector for Objective-C and Expected method body,也不知道什么原因,可能是按到什么键了。在网上搜索了一下报错,说是把这个文件删除了重新把代码写一遍。但发现还是报错。
有一篇文章提到,说报错在一个文件,而出错在另一个文件,于是找了一下打开的另一个类文件,仔细看了一下,确实是多了个 + 号在文件最开始的地方,删了就解决了。

![ ![屏幕快照 2016-12-15 上午9.13.33.png](http://upload-images.jianshu.io/upload_images/3026808-1a03d7e864939d73.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)](http://upload-images.jianshu.io/upload_images/3026808-c9e4fc8c62371ffb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

你可能感兴趣的:(Xcode报错Expected selector for Objective-C and Expected method body)