diff --git a/iphone/Maps/Core/WebImage/UIImageView+WebImage.m b/iphone/Maps/Core/WebImage/UIImageView+WebImage.m index d27901d80c..4d2d856eb4 100644 --- a/iphone/Maps/Core/WebImage/UIImageView+WebImage.m +++ b/iphone/Maps/Core/WebImage/UIImageView+WebImage.m @@ -26,16 +26,13 @@ static char kAssociatedObjectKey; [UIView transitionWithView:self duration:duration options:UIViewAnimationOptionTransitionCrossDissolve - animations:^{ - self.image = image; - } - completion:^(BOOL finished) { - if (completion) { completion(image, nil); } - }]; + animations:^{ self.image = image; } + completion:nil]; } else { self.image = image; - if (completion) { completion(image, nil); } } + + if (completion) { completion(image, nil); } }]; objc_setAssociatedObject(self, &kAssociatedObjectKey, task, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } diff --git a/iphone/Maps/UI/Ads/AdBanner.swift b/iphone/Maps/UI/Ads/AdBanner.swift index 4c0815cf33..54bc496a77 100644 --- a/iphone/Maps/UI/Ads/AdBanner.swift +++ b/iphone/Maps/UI/Ads/AdBanner.swift @@ -110,7 +110,9 @@ final class AdBanner: UITableViewCell { @objc weak var mpNativeAd: MPNativeAd? override func prepareForReuse() { + super.prepareForReuse() adIconImageView.wi_cancelImageRequest() + adIconImageView.image = nil; } private var nativeAd: Banner? { diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift index 3a091962aa..aaab29e769 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift @@ -6,6 +6,11 @@ final class CarouselElement: UICollectionViewCell { image.wi_setImage(with: url, transitionDuration: kDefaultAnimationDuration) dimMask.forEach { $0.isHidden = !isLastCell } } + + override func prepareForReuse() { + super.prepareForReuse() + image.image = nil; + } } @objc(MWMPPHotelCarouselCell) diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift index 3f746c1ff6..e9b8d68ceb 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift @@ -10,6 +10,8 @@ final class GalleryCell: UICollectionViewCell { } override func prepareForReuse() { + super.prepareForReuse() imageView.wi_cancelImageRequest() + imageView.image = nil; } }