Image loading indicator does not work
Hi, I observed that image loading indicator des not work. It always appears and disappears properly but never animate.

I found that MWZoomingScrollView does not contain any image in photo property during fetching image from web. So it can not satisfy condition above:
- (void)setProgressFromNotification:(NSNotification *)notification {
dispatch_async(dispatch_get_main_queue(), ^{
NSDictionary *dict = [notification object];
id <MWPhoto> photoWithProgress = [dict objectForKey:@"photo"];
if (photoWithProgress == self.photo) {
float progress = [[dict valueForKey:@"progress"] floatValue];
_loadingIndicator.progress = MAX(MIN(1, progress), 0);
}
});
}
I'm experiencing the same issue.
I'm experiencing the same issue.
I'm experiencing the same issue. How fix it?
I'm experiencing the same issue. How fix it?
Me too, please help us 👍
@listicos @JaydeepPatel @DevChen @rafalkitta Check your code for something that cancels your web operations on view disappearance. And by view I mean a controller that presents your MWPhotoBrowser. Because that 'bug' happens only when an image downloading operation is rapidly canceled right after beginning.
I have the same issue and there isn't anything that cancels downloading operation!
Put this methods in your view controller, it will solve your issue.
#pragma mark - MWPhotoBrowserDelegate
-(NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser { return _photos.count; }
-(id
-(id
//-(MWCaptionView *)photoBrowser:(MWPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index { // MWPhoto *photo = [self.photos objectAtIndex:index]; // MWCaptionView *captionView = [[MWCaptionView alloc] initWithPhoto:photo]; // return [captionView autorelease]; //}
//-(void)photoBrowser:(MWPhotoBrowser *)photoBrowser actionButtonPressedForPhotoAtIndex:(NSUInteger)index { // NSLog(@"ACTION!"); //}
-(void)photoBrowser:(MWPhotoBrowser *)photoBrowser didDisplayPhotoAtIndex:(NSUInteger)indexed { NSLog(@"Did start viewing photo at index %lu", (unsigned long)indexed); }
//-(NSString *)photoBrowser:(MWPhotoBrowser *)photoBrowser titleForPhotoAtIndex:(NSUInteger)index { // return [NSString stringWithFormat:@"Photo %lu", (unsigned long)index+1]; //}
-(void)photoBrowserDidFinishModalPresentation:(MWPhotoBrowser *)photoBrowser { // If we subscribe to this method we must dismiss the view controller ourselves NSLog(@"Did finish modal presentation"); [self dismissViewControllerAnimated:YES completion:nil]; }