Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __block UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:activityStyle];
- activityIndicator.center = imageView.center;
- activityIndicator.hidesWhenStopped = YES;
- [imageView setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
- placeholderImage:[UIImage imageNamed:@"placeholder.png"]
- success:^(UIImage *image) { [activityIndicator removeFromSuperview]; }
- failure:^(NSError *error) { [activityIndicator removeFromSuperview]; }];
- [imageView addSubview:activityIndicator];
- [activityIndicator startAnimating];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement