나는 배포 할 작업 응용 프로그램을 가지고 있으며 NSLog 문을 정리하고 있습니다. "case"문에서 NSLog를 제거하면 NSArray가 "case"문 오류 내에서 앞에 선언 된 AND로 선언되지 않은 상태로 선언됩니다. 왜이게 될지 아무 생각 없어? 이것은 현재 NSLog를 제거하고있는 내 응용 프로그램의 모든 경우에 발생합니다. 예제 코드 섹션 아래에 나타납니다IPhone SDK에서 NSLog를 제거하면 NSArray가 선언되지 않습니다!
switch (chosenScene)
{
case 0:
//NSLog(@"group1"); // the following NSArray errors with "expected expression.." AND "..group1Secondsarray undeclared"
NSArray *group1SecondsArray = [NSArray arrayWithObjects: @"Dummy",@"1/15",@"1/30",@"1/30",@"1/60",@"1/125",@"1/250",nil];
NSArray *group1FStopArray = [NSArray arrayWithObjects: @"Dummy",@"2.8",@"2.8",@"4",@"5.6",@"5.6",@"5.6",nil];
NSString *group1SecondsText = [group1SecondsArray objectAtIndex:slider.value];
calculatedSeconds.text = group1SecondsText;
NSString *group1FStopText = [group1FStopArray objectAtIndex:slider.value];
calculatedFStop.text = group1FStopText;
[group1SecondsText release];
[group1FStopText release];
break;
대단한데, 내 문제를 해결했습니다. 답장을 보내 주셔서 감사합니다. –
Maxwell Segal - 답변이 맞으면 옆에있는 체크 표시를 눌러 시스템에서 질문에 대한 답변을 얻고 Eyal Redler가 크레딧을받을 수 있도록하십시오. – TechZen