ドット構文は、基本的にゲッターを呼び出すためのショートカットです。getter メソッドに無限再帰があります。
あなたがする必要があるのは、インスタンス変数を直接返すことです:
- (NSInteger)getSolutionsCount {
//latest xcode makes variables with _property name automatically
return _solutionsCount;
//older versions of xcode or having written @synthesize solutionsCount
//will necessitate
//return solutionsCount;
}
また、FYI Objective-C の慣例は、getter メソッドを変数名として定義することです。プロパティ宣言にgetterを書かないと、プロパティ名と同じgetterが想定される
編集: また、コンパイラに自動的に作成させる場合、何も書く必要がないため、これがゲッターの実装全体ではないと想定しています。(または、@synthesize propertyName = _propertyName
古いバージョンの xCode を使用して実装ブロックに書き込むことによって)