I have a loop that creates different graphs(views)
for (int i = 0; i < numberOfGraphs; i++) {
GraphView *graph = [[GraphView alloc] initWithFrame:CGRectMake(xOrigin, 30, 180, 160)];
// graph.value = value;
[self.view addSubview:graph];
}
each graph should have different values.. and those values can be updated every second.. how can I do that?
If I use a timer and call the function above, then it keeps drawing the graph..
You could try adding the graphs in an NSMutableArray as you go through the loop so that you have a hold of each one after they’ve been initialized.
If you need help updating them in real time, take a look at the GraphView.m file in Apple’s AccelerometerGraph sample code