スイッチがあります。ケースの 1 つは、配列の数でなければなりません。
int count = [array count];
switch (someValue) {
case 0:
[self foo];
break;
case count:
[self bar];
break;
default:
break;
}
しかし、コンパイラは次のように述べています。
Expression is not an integer constant expression
[配列カウント]からconst intを作成するには?