I have a UITableViewCell. I'm trying to animate a progress bar when the cell comes into view. I have tried the following but it does nothing.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *cellId = @"TableViewCellResult";
TableViewCellResults *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
if (cell == nil) {
cell = [[TableViewCellResults alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
}
// Add progress bar here
// THIS DOES NOTHING
[UIView animateWithDuration:10.f animations:^{
progressBar.value = 55.f;
}];
How do I animate the UIProgressBar? The UIProgressBar does not accept 'animateWithDuration'.
I have working sample of animating the UIProgressBar in UIView (not a cell) that uses the same syntax.