[Solved] Updating UILabel in a loop?


You should set a timer to handle the update of your label. Right now the whole loop is happening in a fraction of a second.

NSTimer * aTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateTimerLabel) userInfo:nil repeats:YES];

-(void)updateTimerLabel {
    static int i = 0;

    [lbl setText:[NSString stringWithFormat:@"%d", i++];
}

This way your label should get updated once every second.

3

solved Updating UILabel in a loop?