0

私は見つけたRotatingWhellProjectを実装しようとしています

http://www.raywenderlich.com/9864/how-to-create-a-rotating-wheel-control-with-uikit

私はiOS開発に非常に慣れていないので、これが実際に私の最初のアプリです:)プロジェクトをビルドしたときに、いくつかのエラーが発生し、修正しましたが、実行時に以下のエラーが発生します。

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(something)

感謝します。どうもありがとう。

4

1 に答える 1

0

countByEnumeratingWithState:objects:count:NSFastEnumerationプロトコルの方法です。はこのプロトコルを実装していませんが、、NSStringなどの他のものは実装しています。NSArrayNSDictionaryNSSet

コードをチェックして、誰が呼び出しているcountByEnumeratingWithState:objects:count:か(NSStringオブジェクトである必要があります)を確認し、プロトコルを実装する有効なタイプの正しいオブジェクトであることを確認します。

于 2012-04-25T13:10:05.037 に答える