-1
if(counter>=keys.count){
NSLog(@"finished");
[_images removeFromSuperview];
// [_alphabetsShowImageView removeFromSuperview];
[_speakerOrMicImageView removeFromSuperview];
UIImageView *congratzView = [[UIImageView alloc]initWithFrame:self.view.frame];
congratzView.image = [UIImage imageNamed:@"congratulation.png"];
[self.view addSubview:congratzView];
}
else{
arrVal = [dictAlpha objectForKey:keys[i]];
if(j>=arrVal.count)
{
NSLog(@"finished");
[_alphabetsShowImageView removeFromSuperview];
[_speakerOrMicImageView removeFromSuperview];
UIImageView *congratzView = [[UIImageView alloc]initWithFrame:self.view.frame];
congratzView.image = [UIImage imageNamed:@"congratulation.png"];
[self.view addSubview:congratzView];
// [self performSelector:@selector(navNew) withObject:nil afterDelay:3];
}
else
{
[commonFunctionObject textToSpeechAction:arrVal :j :_alphabetsShowImageView :_speakerOrMicImageView :isMicPresent];
[NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(ActionToCkeckRecordCompletion) userInfo:nil repeats:YES];
}
}
}
出力のインデックスが範囲を越えて2 [0 .. 1] = arrval.count then else条件に.orを入力し、if条件ループに入る。 カウンタ> = keys.count場合 は、それはあなたが反復するcounter
を使用しているが、あなたは別の変数と配列要素にアクセスしている文の条件__NSArrayI objectAtIndex:]:私はJ <そして 、それはif文の条件に入力する必要があります カウンタ< = keys.count をneed- Objective-Cの