I'm trying to do some animation to my UIProgressView when i finished upload a photo to my server. When i set the duration to 5.0 or 10.0 seconds, it it not different and the completition is called immediately.
[UIView animateWithDuration:5.0 animations:^{
self.progressBar.progress = 1.0;
} completion:^(BOOL finished) {
NSLog(@"kykny udah");
if (finished) {
NSLog(@"finished");
Post *post = [mappingResult.dictionary objectForKey:@""];
[self.posts insertObject:post atIndex:0];
NSLog(@"caption: %@ , items: %@",post.caption, post.items);
CGRect frame = self.progressView.frame;
frame.size.height = 0;
self.progressView.frame = frame;
[self.tableView reloadData];
}
}];
how come this issue happens ? It is just like a normal sequence code in reality