Iphone iOS RotatingWheels项目异常错误
我正在尝试实施我在上找到的RotatingWhell项目 我对iOS开发非常陌生,这实际上是我的第一个应用:) 当我构建项目时,我遇到了一些错误,我修复了它们,但在运行时我遇到了以下错误:Iphone iOS RotatingWheels项目异常错误,iphone,objective-c,ios,exception-handling,Iphone,Objective C,Ios,Exception Handling,我正在尝试实施我在上找到的RotatingWhell项目 我对iOS开发非常陌生,这实际上是我的第一个应用:) 当我构建项目时,我遇到了一些错误,我修复了它们,但在运行时我遇到了以下错误: 2012-04-24 10:58:21.436 RotaryWheelProject[4122:207] -[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x4b
2012-04-24 10:58:21.436 RotaryWheelProject[4122:207] -[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x4b19370
2012-04-24 10:58:21.439 RotaryWheelProject[4122:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x4b19370'
terminate called after throwing an instance of 'NSException'
不难理解,我有一个异常错误,我没有处理,但我似乎不知道在哪里
有一行我改正了
@autorelease{return main(something..)}
只返回main(某物)
谢谢你的帮助。非常感谢。使用state:objects:count:枚举CountByEnumerating是一种协议方法
NSString
不实现此协议,而诸如NSArray
、NSDictionary
和NSSet
等其他东西则实现此协议
检查您的代码,查看谁在使用state:objects:count:枚举来调用countbyEnumerating(应该是NSString对象),并确保它是实现协议的正确的有效类型的对象