forked from organicmaps/organicmaps
[ios] Rich pp was tuned.
This commit is contained in:
parent
789b8416f2
commit
fce669d15b
4 changed files with 7 additions and 6 deletions
|
@ -20,6 +20,9 @@
|
|||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="49T-yd-qah">
|
||||
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Mmh-sw-uHm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="150" height="100"/>
|
||||
|
@ -47,7 +50,6 @@
|
|||
<outlet property="image" destination="49T-yd-qah" id="oUk-H9-V0F"/>
|
||||
<outletCollection property="dimMask" destination="Mmh-sw-uHm" collectionClass="NSMutableArray" id="DdN-K1-Ytc"/>
|
||||
<outletCollection property="dimMask" destination="2V7-Dd-KtM" collectionClass="NSMutableArray" id="BeV-h5-wJV"/>
|
||||
|
||||
</connections>
|
||||
<point key="canvasLocation" x="43" y="118"/>
|
||||
</collectionViewCell>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue