ラベルの更新で問題に直面しています.古い値は削除されないため、新しい値が古い値の上に表示されます..これに関する助けがあれば幸いです..
timer = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(updateLabels)
userInfo:nil
repeats:YES];
-(void) updateLabels{
for (GraphView *graph in arr){
// retrieve the graph values
valLabel = [[UILabel alloc] initWithFrame:CGRectMake(i * 200, 0, 90, 100)];
valLabel.textColor = [UIColor whiteColor];
valLabel.backgroundColor = [UIColor clearColor];
valLabel.text = [NSString stringWithFormat:@"Value: %f", x];
i++;
}
}