Showing
5 changed files
with
174 additions
and
18 deletions
No preview for this file type
... | @@ -8,5 +8,12 @@ | ... | @@ -8,5 +8,12 @@ |
8 | import UIKit | 8 | import UIKit |
9 | 9 | ||
10 | @objc public class FiltersCollectionViewCell: UICollectionViewCell { | 10 | @objc public class FiltersCollectionViewCell: UICollectionViewCell { |
11 | + @IBOutlet weak var filterLabel: UILabel! | ||
12 | + @IBOutlet weak var borderView: UIView! | ||
11 | 13 | ||
14 | + func configureCell(filterName: String, isSelected: Bool) { | ||
15 | + filterLabel.text = filterName | ||
16 | + borderView.backgroundColor = isSelected ? UIColor(rgb: 0xE8002A) : .clear | ||
17 | + filterLabel.textColor = isSelected ? UIColor(rgb: 0x484848) : UIColor(rgb: 0xD3D3D3) | ||
18 | + } | ||
12 | } | 19 | } | ... | ... |
... | @@ -11,9 +11,11 @@ import UIKit | ... | @@ -11,9 +11,11 @@ import UIKit |
11 | @IBOutlet weak var headerView: UIView! | 11 | @IBOutlet weak var headerView: UIView! |
12 | @IBOutlet weak var closeImage: UIImageView! | 12 | @IBOutlet weak var closeImage: UIImageView! |
13 | @IBOutlet weak var logoImage: UIImageView! | 13 | @IBOutlet weak var logoImage: UIImageView! |
14 | + @IBOutlet weak var filtersView: UIView! | ||
15 | + @IBOutlet weak var collectionView: UICollectionView! | ||
14 | 16 | ||
15 | - var selectedScreen: String = "" | 17 | + var selectedScreen: String = "Offers" |
16 | - var filtersList: Array<String> = ["Όλα", "Σπίτι", "Έξοδος", "Υγεία"] | 18 | + var filtersList: Array<String> = ["Screen", "Όλα", "Σπίτι", "Έξοδος", "Υγεία"] |
17 | var selectedFilter: String = "Όλα" | 19 | var selectedFilter: String = "Όλα" |
18 | 20 | ||
19 | public override func viewDidLoad() { | 21 | public override func viewDidLoad() { |
... | @@ -24,6 +26,15 @@ import UIKit | ... | @@ -24,6 +26,15 @@ import UIKit |
24 | 26 | ||
25 | closeImage.image = UIImage(named: "close_btn_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 27 | closeImage.image = UIImage(named: "close_btn_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
26 | logoImage.image = UIImage(named: "epistrofi_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 28 | logoImage.image = UIImage(named: "epistrofi_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
29 | + | ||
30 | + // Add shadow | ||
31 | + filtersView.layer.shadowColor = UIColor(rgb: 0x000000).cgColor | ||
32 | + filtersView.layer.shadowOffset = CGSize(width: 0.0, height: 10.0) | ||
33 | + filtersView.layer.shadowOpacity = 0.05 | ||
34 | + filtersView.layer.shadowRadius = 6.0 | ||
35 | + | ||
36 | + collectionView.contentInset.left = 20 | ||
37 | + collectionView.contentInset.right = 20 | ||
27 | } | 38 | } |
28 | 39 | ||
29 | } | 40 | } |
... | @@ -38,8 +49,29 @@ extension LoyaltyViewController: UICollectionViewDataSource,UICollectionViewDele | ... | @@ -38,8 +49,29 @@ extension LoyaltyViewController: UICollectionViewDataSource,UICollectionViewDele |
38 | } | 49 | } |
39 | 50 | ||
40 | public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | 51 | public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
41 | - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ScreenCollectionViewCellId", for: indexPath) as! ScreenCollectionViewCell | 52 | + if (indexPath.row == 0) { |
42 | -// cell.myLabel.text = "ABCD" | 53 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ScreenCollectionViewCellId", for: indexPath) as! ScreenCollectionViewCell |
43 | - return cell; | 54 | + cell.configureCell(screen: selectedScreen) |
55 | + return cell; | ||
56 | + | ||
57 | + } else { | ||
58 | + let currentFilter = filtersList[indexPath.row]; | ||
59 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "FiltersCollectionViewCellId", for: indexPath) as! FiltersCollectionViewCell | ||
60 | + cell.configureCell(filterName: currentFilter, isSelected: currentFilter == selectedFilter) | ||
61 | + return cell; | ||
62 | + } | ||
63 | + } | ||
64 | + | ||
65 | + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
66 | + if (indexPath.row == 0) { | ||
67 | + let offersSelected = selectedScreen == "Offers"; | ||
68 | + selectedScreen = offersSelected ? "Map" : "Offers" | ||
69 | + | ||
70 | + } else { | ||
71 | + let currentFilter = filtersList[indexPath.row]; | ||
72 | + selectedFilter = currentFilter; | ||
73 | + } | ||
74 | + | ||
75 | + collectionView.reloadData(); | ||
44 | } | 76 | } |
45 | } | 77 | } | ... | ... |
... | @@ -3991,7 +3991,7 @@ | ... | @@ -3991,7 +3991,7 @@ |
3991 | <!--Loyalty View Controller--> | 3991 | <!--Loyalty View Controller--> |
3992 | <scene sceneID="wdU-7S-AU1"> | 3992 | <scene sceneID="wdU-7S-AU1"> |
3993 | <objects> | 3993 | <objects> |
3994 | - <viewController storyboardIdentifier="LoyaltyViewController" id="zKA-A2-Dl8" customClass="LoyaltyViewController" customModule="ResourcesBundle" customModuleProvider="target" sceneMemberID="viewController"> | 3994 | + <viewController storyboardIdentifier="LoyaltyViewController" id="zKA-A2-Dl8" customClass="LoyaltyViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> |
3995 | <view key="view" contentMode="scaleToFill" id="YeC-iK-Hrq"> | 3995 | <view key="view" contentMode="scaleToFill" id="YeC-iK-Hrq"> |
3996 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | 3996 | <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
3997 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 3997 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
... | @@ -4027,13 +4027,13 @@ | ... | @@ -4027,13 +4027,13 @@ |
4027 | </constraints> | 4027 | </constraints> |
4028 | </view> | 4028 | </view> |
4029 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZDd-1H-T7x" userLabel="Filters View"> | 4029 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZDd-1H-T7x" userLabel="Filters View"> |
4030 | - <rect key="frame" x="0.0" y="176" width="414" height="100"/> | 4030 | + <rect key="frame" x="0.0" y="176" width="414" height="89"/> |
4031 | <subviews> | 4031 | <subviews> |
4032 | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="3Ff-i2-KRi"> | 4032 | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="3Ff-i2-KRi"> |
4033 | - <rect key="frame" x="0.0" y="0.0" width="414" height="100"/> | 4033 | + <rect key="frame" x="0.0" y="15" width="414" height="49"/> |
4034 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 4034 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4035 | <constraints> | 4035 | <constraints> |
4036 | - <constraint firstAttribute="height" constant="100" id="pnI-y1-sVK"/> | 4036 | + <constraint firstAttribute="height" constant="49" id="pnI-y1-sVK"/> |
4037 | </constraints> | 4037 | </constraints> |
4038 | <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bwb-bV-3Wq"> | 4038 | <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bwb-bV-3Wq"> |
4039 | <size key="itemSize" width="128" height="128"/> | 4039 | <size key="itemSize" width="128" height="128"/> |
... | @@ -4042,22 +4042,117 @@ | ... | @@ -4042,22 +4042,117 @@ |
4042 | <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | 4042 | <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> |
4043 | </collectionViewFlowLayout> | 4043 | </collectionViewFlowLayout> |
4044 | <cells> | 4044 | <cells> |
4045 | - <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ScreenCollectionViewCellId" id="oyy-X4-NUR"> | 4045 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ScreenCollectionViewCellId" id="oyy-X4-NUR" customClass="ScreenCollectionViewCell" customModule="SwiftWarplyFramework"> |
4046 | - <rect key="frame" x="0.0" y="-14" width="128" height="128"/> | 4046 | + <rect key="frame" x="0.0" y="0.0" width="98" height="49"/> |
4047 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 4047 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
4048 | <collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="neg-3H-s9N"> | 4048 | <collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="neg-3H-s9N"> |
4049 | - <rect key="frame" x="0.0" y="0.0" width="128" height="128"/> | 4049 | + <rect key="frame" x="0.0" y="0.0" width="98" height="49"/> |
4050 | <autoresizingMask key="autoresizingMask"/> | 4050 | <autoresizingMask key="autoresizingMask"/> |
4051 | <subviews> | 4051 | <subviews> |
4052 | - <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9OA-DS-AH2"> | 4052 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9OA-DS-AH2"> |
4053 | - <rect key="frame" x="-56" y="0.0" width="240" height="128"/> | 4053 | + <rect key="frame" x="0.0" y="0.0" width="98" height="45"/> |
4054 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 4054 | + <subviews> |
4055 | - <color key="backgroundColor" systemColor="systemBackgroundColor"/> | 4055 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SIx-84-Ls3"> |
4056 | + <rect key="frame" x="15" y="14" width="16" height="17"/> | ||
4057 | + <constraints> | ||
4058 | + <constraint firstAttribute="width" constant="16" id="LkV-Qi-2xD"/> | ||
4059 | + <constraint firstAttribute="height" constant="17" id="yPN-uU-UeI"/> | ||
4060 | + </constraints> | ||
4061 | + </imageView> | ||
4062 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xvH-T7-AJf"> | ||
4063 | + <rect key="frame" x="39" y="12" width="44" height="21"/> | ||
4064 | + <fontDescription key="fontDescription" type="system" pointSize="18"/> | ||
4065 | + <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4066 | + <nil key="highlightedColor"/> | ||
4067 | + </label> | ||
4068 | + </subviews> | ||
4069 | + <color key="backgroundColor" red="0.91764705882352937" green="0.0" blue="0.16470588235294117" alpha="1" colorSpace="calibratedRGB"/> | ||
4070 | + <constraints> | ||
4071 | + <constraint firstItem="xvH-T7-AJf" firstAttribute="leading" secondItem="SIx-84-Ls3" secondAttribute="trailing" constant="8" id="0kE-Nh-Zm5"/> | ||
4072 | + <constraint firstItem="SIx-84-Ls3" firstAttribute="leading" secondItem="9OA-DS-AH2" secondAttribute="leading" constant="15" id="9Oh-Zp-fq4"/> | ||
4073 | + <constraint firstAttribute="height" constant="45" id="Lc2-Ef-Q1g"/> | ||
4074 | + <constraint firstItem="SIx-84-Ls3" firstAttribute="centerY" secondItem="9OA-DS-AH2" secondAttribute="centerY" id="kDa-Yw-Fka"/> | ||
4075 | + <constraint firstAttribute="trailing" secondItem="xvH-T7-AJf" secondAttribute="trailing" constant="15" id="pkU-1m-NGy"/> | ||
4076 | + <constraint firstItem="xvH-T7-AJf" firstAttribute="centerY" secondItem="9OA-DS-AH2" secondAttribute="centerY" id="rxp-3F-6jz"/> | ||
4077 | + </constraints> | ||
4056 | </view> | 4078 | </view> |
4057 | </subviews> | 4079 | </subviews> |
4058 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 4080 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4081 | + <constraints> | ||
4082 | + <constraint firstItem="9OA-DS-AH2" firstAttribute="top" secondItem="neg-3H-s9N" secondAttribute="top" id="FoU-pB-CWF"/> | ||
4083 | + <constraint firstAttribute="trailing" secondItem="9OA-DS-AH2" secondAttribute="trailing" id="YGo-uQ-rbP"/> | ||
4084 | + <constraint firstAttribute="bottom" secondItem="9OA-DS-AH2" secondAttribute="bottom" constant="4" id="cd6-6H-RLY"/> | ||
4085 | + <constraint firstItem="9OA-DS-AH2" firstAttribute="leading" secondItem="neg-3H-s9N" secondAttribute="leading" id="s7T-Pi-y62"/> | ||
4086 | + </constraints> | ||
4059 | </collectionViewCellContentView> | 4087 | </collectionViewCellContentView> |
4060 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 4088 | <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4089 | + <connections> | ||
4090 | + <outlet property="containerView" destination="9OA-DS-AH2" id="iYe-FL-wvD"/> | ||
4091 | + <outlet property="filterImage" destination="SIx-84-Ls3" id="eYj-3y-Y48"/> | ||
4092 | + <outlet property="filterLabel" destination="xvH-T7-AJf" id="0IL-GW-Daf"/> | ||
4093 | + </connections> | ||
4094 | + </collectionViewCell> | ||
4095 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="FiltersCollectionViewCellId" id="Sak-h8-xcG" customClass="FiltersCollectionViewCell" customModule="SwiftWarplyFramework"> | ||
4096 | + <rect key="frame" x="108" y="2" width="65" height="45"/> | ||
4097 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
4098 | + <collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="MDo-0S-AaL"> | ||
4099 | + <rect key="frame" x="0.0" y="0.0" width="65" height="45"/> | ||
4100 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
4101 | + <subviews> | ||
4102 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c0z-js-0Cx"> | ||
4103 | + <rect key="frame" x="0.0" y="0.0" width="65" height="45"/> | ||
4104 | + <subviews> | ||
4105 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lE0-Fh-ZOu" userLabel="Top View"> | ||
4106 | + <rect key="frame" x="10" y="0.0" width="45" height="41"/> | ||
4107 | + <subviews> | ||
4108 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fqT-n0-qFj"> | ||
4109 | + <rect key="frame" x="0.0" y="10" width="45" height="21"/> | ||
4110 | + <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> | ||
4111 | + <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4112 | + <nil key="highlightedColor"/> | ||
4113 | + </label> | ||
4114 | + </subviews> | ||
4115 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4116 | + <constraints> | ||
4117 | + <constraint firstAttribute="trailing" secondItem="fqT-n0-qFj" secondAttribute="trailing" id="WO9-x0-czQ"/> | ||
4118 | + <constraint firstItem="fqT-n0-qFj" firstAttribute="centerY" secondItem="lE0-Fh-ZOu" secondAttribute="centerY" id="v9r-ZL-nlz"/> | ||
4119 | + <constraint firstItem="fqT-n0-qFj" firstAttribute="leading" secondItem="lE0-Fh-ZOu" secondAttribute="leading" id="zH9-zP-uIO"/> | ||
4120 | + </constraints> | ||
4121 | + </view> | ||
4122 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1uI-vE-hfs"> | ||
4123 | + <rect key="frame" x="10" y="41" width="45" height="4"/> | ||
4124 | + <color key="backgroundColor" red="0.90980392156862744" green="0.0" blue="0.16470588235294117" alpha="0.0" colorSpace="calibratedRGB"/> | ||
4125 | + <constraints> | ||
4126 | + <constraint firstAttribute="height" constant="4" id="IPx-4M-kWs"/> | ||
4127 | + </constraints> | ||
4128 | + </view> | ||
4129 | + </subviews> | ||
4130 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4131 | + <constraints> | ||
4132 | + <constraint firstAttribute="trailing" secondItem="lE0-Fh-ZOu" secondAttribute="trailing" constant="10" id="D3X-JA-gEh"/> | ||
4133 | + <constraint firstAttribute="height" constant="45" id="Dn3-yl-Bcw"/> | ||
4134 | + <constraint firstItem="1uI-vE-hfs" firstAttribute="leading" secondItem="c0z-js-0Cx" secondAttribute="leading" constant="10" id="Sl8-Jv-AIe"/> | ||
4135 | + <constraint firstAttribute="bottom" secondItem="1uI-vE-hfs" secondAttribute="bottom" id="YvN-iI-gHZ"/> | ||
4136 | + <constraint firstItem="lE0-Fh-ZOu" firstAttribute="top" secondItem="c0z-js-0Cx" secondAttribute="top" id="gRF-JW-kwP"/> | ||
4137 | + <constraint firstAttribute="trailing" secondItem="1uI-vE-hfs" secondAttribute="trailing" constant="10" id="gXe-kC-b7J"/> | ||
4138 | + <constraint firstItem="lE0-Fh-ZOu" firstAttribute="leading" secondItem="c0z-js-0Cx" secondAttribute="leading" constant="10" id="jji-Lb-RLX"/> | ||
4139 | + <constraint firstItem="1uI-vE-hfs" firstAttribute="top" secondItem="lE0-Fh-ZOu" secondAttribute="bottom" id="tV3-RZ-jsb"/> | ||
4140 | + </constraints> | ||
4141 | + </view> | ||
4142 | + </subviews> | ||
4143 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4144 | + <constraints> | ||
4145 | + <constraint firstAttribute="bottom" secondItem="c0z-js-0Cx" secondAttribute="bottom" id="9Ig-w0-cIW"/> | ||
4146 | + <constraint firstItem="c0z-js-0Cx" firstAttribute="leading" secondItem="MDo-0S-AaL" secondAttribute="leading" id="B9b-Fp-CIM"/> | ||
4147 | + <constraint firstAttribute="trailing" secondItem="c0z-js-0Cx" secondAttribute="trailing" id="Beo-UQ-FZi"/> | ||
4148 | + <constraint firstItem="c0z-js-0Cx" firstAttribute="top" secondItem="MDo-0S-AaL" secondAttribute="top" id="nek-ca-jRj"/> | ||
4149 | + </constraints> | ||
4150 | + </collectionViewCellContentView> | ||
4151 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
4152 | + <connections> | ||
4153 | + <outlet property="borderView" destination="1uI-vE-hfs" id="PXN-Zb-GTx"/> | ||
4154 | + <outlet property="filterLabel" destination="fqT-n0-qFj" id="8b3-pW-Z3d"/> | ||
4155 | + </connections> | ||
4061 | </collectionViewCell> | 4156 | </collectionViewCell> |
4062 | </cells> | 4157 | </cells> |
4063 | <connections> | 4158 | <connections> |
... | @@ -4069,9 +4164,9 @@ | ... | @@ -4069,9 +4164,9 @@ |
4069 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 4164 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
4070 | <constraints> | 4165 | <constraints> |
4071 | <constraint firstItem="3Ff-i2-KRi" firstAttribute="leading" secondItem="ZDd-1H-T7x" secondAttribute="leading" id="BjC-Ge-MmK"/> | 4166 | <constraint firstItem="3Ff-i2-KRi" firstAttribute="leading" secondItem="ZDd-1H-T7x" secondAttribute="leading" id="BjC-Ge-MmK"/> |
4072 | - <constraint firstAttribute="bottom" secondItem="3Ff-i2-KRi" secondAttribute="bottom" id="VEJ-Z8-lMd"/> | 4167 | + <constraint firstAttribute="bottom" secondItem="3Ff-i2-KRi" secondAttribute="bottom" constant="25" id="VEJ-Z8-lMd"/> |
4073 | <constraint firstAttribute="trailing" secondItem="3Ff-i2-KRi" secondAttribute="trailing" id="VPb-oz-go1"/> | 4168 | <constraint firstAttribute="trailing" secondItem="3Ff-i2-KRi" secondAttribute="trailing" id="VPb-oz-go1"/> |
4074 | - <constraint firstItem="3Ff-i2-KRi" firstAttribute="top" secondItem="ZDd-1H-T7x" secondAttribute="top" id="ZOb-HP-thS"/> | 4169 | + <constraint firstItem="3Ff-i2-KRi" firstAttribute="top" secondItem="ZDd-1H-T7x" secondAttribute="top" constant="15" id="ZOb-HP-thS"/> |
4075 | </constraints> | 4170 | </constraints> |
4076 | </view> | 4171 | </view> |
4077 | </subviews> | 4172 | </subviews> |
... | @@ -4097,6 +4192,8 @@ | ... | @@ -4097,6 +4192,8 @@ |
4097 | </view> | 4192 | </view> |
4098 | <connections> | 4193 | <connections> |
4099 | <outlet property="closeImage" destination="b5d-hX-vcb" id="esI-7p-Ycc"/> | 4194 | <outlet property="closeImage" destination="b5d-hX-vcb" id="esI-7p-Ycc"/> |
4195 | + <outlet property="collectionView" destination="3Ff-i2-KRi" id="7GZ-4D-yqt"/> | ||
4196 | + <outlet property="filtersView" destination="ZDd-1H-T7x" id="HUd-Ox-bcV"/> | ||
4100 | <outlet property="headerView" destination="Iq3-R0-fBz" id="E4T-bn-yYD"/> | 4197 | <outlet property="headerView" destination="Iq3-R0-fBz" id="E4T-bn-yYD"/> |
4101 | <outlet property="logoImage" destination="GZK-rw-pZV" id="qwb-ae-QFc"/> | 4198 | <outlet property="logoImage" destination="GZK-rw-pZV" id="qwb-ae-QFc"/> |
4102 | </connections> | 4199 | </connections> | ... | ... |
... | @@ -8,5 +8,25 @@ | ... | @@ -8,5 +8,25 @@ |
8 | import UIKit | 8 | import UIKit |
9 | 9 | ||
10 | @objc public class ScreenCollectionViewCell: UICollectionViewCell { | 10 | @objc public class ScreenCollectionViewCell: UICollectionViewCell { |
11 | + @IBOutlet weak var containerView: UIView! | ||
12 | + @IBOutlet weak var filterImage: UIImageView! | ||
13 | + @IBOutlet weak var filterLabel: UILabel! | ||
11 | 14 | ||
15 | + public override func awakeFromNib() { | ||
16 | + super.awakeFromNib() | ||
17 | + | ||
18 | + containerView.layer.cornerRadius = 23.0 | ||
19 | + containerView.clipsToBounds = true | ||
20 | + } | ||
21 | + | ||
22 | + func configureCell(screen: String) { | ||
23 | + if (screen == "Offers") { | ||
24 | + filterImage.image = UIImage(named: "list", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
25 | + filterLabel.text = "Λίστα" | ||
26 | + | ||
27 | + } else { | ||
28 | + filterImage.image = UIImage(named: "map_pin", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ||
29 | + filterLabel.text = "Χάρτης" | ||
30 | + } | ||
31 | + } | ||
12 | } | 32 | } | ... | ... |
-
Please register or login to post a comment