From fce669d15b40e5ad84ccab924769dc26c21d284a Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Tue, 28 Feb 2017 13:11:15 +0300 Subject: [PATCH] [ios] Rich pp was tuned. --- .../PlacePageLayout/Content/BookingCells/CarouselElement.xib | 4 +++- .../Content/BookingCells/PPHotelCarouselCell.swift | 4 ++-- .../PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift | 3 +-- .../Content/Gallery/GalleryItemViewController.swift | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/CarouselElement.xib b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/CarouselElement.xib index 5c4abe5510..161290e482 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/CarouselElement.xib +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/CarouselElement.xib @@ -20,6 +20,9 @@ + + + @@ -47,7 +50,6 @@ - diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift index c0119ea901..b425ba6d9c 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/BookingCells/PPHotelCarouselCell.swift @@ -3,7 +3,7 @@ final class CarouselElement : UICollectionViewCell { @IBOutlet private var dimMask: [UIView]! func config(with url: URL, isLastCell: Bool) { - image.af_setImage(withURL: url, placeholderImage: #imageLiteral(resourceName: "ic_placeholder")) + image.af_setImage(withURL: url, imageTransition: .crossDissolve(kDefaultAnimationDuration)) dimMask.forEach { $0.isHidden = !isLastCell } } } @@ -39,7 +39,7 @@ extension PPHotelCarouselCell: UICollectionViewDelegate, UICollectionViewDataSou let cell = collectionView.dequeueReusableCell(withCellClass: CarouselElement.self, indexPath: indexPath) as! CarouselElement - cell.config(with: dataSource[indexPath.item].previewURL, isLastCell: isLastCell(indexPath)) + cell.config(with: dataSource[indexPath.item].imageURL, isLastCell: isLastCell(indexPath)) return cell } 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 a28b134165..63ebe81f7f 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/Cells/GalleryCell.swift @@ -7,8 +7,7 @@ final class GalleryCell: UICollectionViewCell { var model: Model! { didSet { - imageView.af_setImage(withURL: model.previewURL, - placeholderImage: #imageLiteral(resourceName: "ic_placeholder")) + imageView.af_setImage(withURL: model.previewURL, imageTransition: .crossDissolve(kDefaultAnimationDuration)) } } diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/GalleryItemViewController.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/GalleryItemViewController.swift index f2ecb29506..eaf5283c21 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/GalleryItemViewController.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/Gallery/GalleryItemViewController.swift @@ -29,7 +29,7 @@ final class GalleryItemViewController: MWMViewController { imageView.contentMode = .scaleAspectFit scrollView.addSubview(imageView) imageView.af_setImage(withURL: model.imageURL, - placeholderImage: #imageLiteral(resourceName: "ic_placeholder")) + imageTransition: .crossDissolve(kDefaultAnimationDuration)) } override func viewDidLayoutSubviews() {