I have a side menu (table) in it, the picture in Headers is located, it is loaded from the server by the link method:
__weak UIImageView *weakImageView = headerCell.imageViewPhoto; NSURLRequest *imageRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://11.111.111.1/%@",[[LZSettingsManager instance] objForKey:kUserPhotoUrl]]] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]; [headerCell.imageViewPhoto setImageWithURLRequest:imageRequest placeholderImage:[UIImage imageNamed:@"menuEmptyUserPhoto"] success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { weakImageView.alpha = 0.0; weakImageView.image = image; // [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTableMenu" object:nil]; [UIView animateWithDuration:0.25 animations:^{ weakImageView.alpha = 1.0; }]; } failure:NULL];
When you first start everything is super loaded. Next, I climb into the profile to change the picture and everything is fine on the server, it changes, but the link remains the same. (for example, www.image1.png and became www.image1.png) and so after changing the picture, I update the table with the method
[self.tableView reloadData];
But the picture remains the same! it does not change, already with the cache I tried and did self.imageViewPhoto.image = nil;
it still does not change, exit the application and enter again, the whole picture is new. How to make a new one immediately load on the same link?