Manos Chorianopoulos

add LoyaltyViewController part1

...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -8,22 +8,38 @@ ...@@ -8,22 +8,38 @@
8 import UIKit 8 import UIKit
9 9
10 @objc public class LoyaltyViewController: UIViewController { 10 @objc public class LoyaltyViewController: UIViewController {
11 + @IBOutlet weak var headerView: UIView!
12 + @IBOutlet weak var closeImage: UIImageView!
13 + @IBOutlet weak var logoImage: UIImageView!
14 +
15 + var selectedScreen: String = ""
16 + var filtersList: Array<String> = ["Όλα", "Σπίτι", "Έξοδος", "Υγεία"]
17 + var selectedFilter: String = "Όλα"
11 18
12 public override func viewDidLoad() { 19 public override func viewDidLoad() {
13 super.viewDidLoad() 20 super.viewDidLoad()
14 21
15 - // Do any additional setup after loading the view. 22 +
23 + headerView.applyGradient(colours: [UIColor(rgb: 0x081748), UIColor(rgb: 0x204EAC)], gradient: GradientOrientation.horizontal, cornerRadius: 0.0)
24 +
25 + closeImage.image = UIImage(named: "close_btn_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
26 + logoImage.image = UIImage(named: "epistrofi_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
16 } 27 }
17 28
29 +}
18 30
19 - /* 31 +extension LoyaltyViewController: UICollectionViewDataSource,UICollectionViewDelegate {
20 - // MARK: - Navigation 32 + public func numberOfSections(in collectionView: UICollectionView) -> Int {
33 + return 1
34 + }
21 35
22 - // In a storyboard-based application, you will often want to do a little preparation before navigation 36 + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
23 - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 37 + return filtersList.count
24 - // Get the new view controller using segue.destination.
25 - // Pass the selected object to the new view controller.
26 } 38 }
27 - */
28 39
40 + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
41 + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ScreenCollectionViewCellId", for: indexPath) as! ScreenCollectionViewCell
42 +// cell.myLabel.text = "ABCD"
43 + return cell;
44 + }
29 } 45 }
......
...@@ -3991,22 +3991,115 @@ ...@@ -3991,22 +3991,115 @@
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="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController"> 3994 + <viewController storyboardIdentifier="LoyaltyViewController" id="zKA-A2-Dl8" customClass="LoyaltyViewController" customModule="ResourcesBundle" 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"/>
3998 <subviews> 3998 <subviews>
3999 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="LoyaltyViewController" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q0C-j0-m2a"> 3999 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XsW-fz-6VQ" userLabel="Main View">
4000 - <rect key="frame" x="124" y="438" width="166" height="21"/> 4000 + <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
4001 + <subviews>
4002 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iq3-R0-fBz" userLabel="Header View">
4003 + <rect key="frame" x="0.0" y="0.0" width="414" height="176"/>
4004 + <subviews>
4005 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="b5d-hX-vcb">
4006 + <rect key="frame" x="379" y="55" width="15" height="15"/>
4007 + <constraints>
4008 + <constraint firstAttribute="height" constant="15" id="4pk-Ee-Rch"/>
4009 + <constraint firstAttribute="width" constant="15" id="EmR-1K-0QL"/>
4010 + </constraints>
4011 + </imageView>
4012 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="GZK-rw-pZV">
4013 + <rect key="frame" x="20" y="85" width="188" height="51"/>
4014 + <constraints>
4015 + <constraint firstAttribute="height" constant="51" id="Fql-bQ-fE8"/>
4016 + <constraint firstAttribute="width" constant="188" id="c9L-fn-il2"/>
4017 + </constraints>
4018 + </imageView>
4019 + </subviews>
4020 + <color key="backgroundColor" systemColor="systemBackgroundColor"/>
4021 + <constraints>
4022 + <constraint firstAttribute="trailing" secondItem="b5d-hX-vcb" secondAttribute="trailing" constant="20" id="7b4-MW-wD8"/>
4023 + <constraint firstAttribute="bottom" secondItem="GZK-rw-pZV" secondAttribute="bottom" constant="40" id="9Rf-JX-IKb"/>
4024 + <constraint firstItem="GZK-rw-pZV" firstAttribute="leading" secondItem="Iq3-R0-fBz" secondAttribute="leading" constant="20" id="BMr-C7-DIL"/>
4025 + <constraint firstItem="GZK-rw-pZV" firstAttribute="top" secondItem="b5d-hX-vcb" secondAttribute="bottom" constant="15" id="U6G-sr-YQ8"/>
4026 + <constraint firstItem="b5d-hX-vcb" firstAttribute="top" secondItem="Iq3-R0-fBz" secondAttribute="top" constant="55" id="eCY-aR-D9c"/>
4027 + </constraints>
4028 + </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"/>
4031 + <subviews>
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"/>
4034 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
4035 + <constraints>
4036 + <constraint firstAttribute="height" constant="100" id="pnI-y1-sVK"/>
4037 + </constraints>
4038 + <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bwb-bV-3Wq">
4039 + <size key="itemSize" width="128" height="128"/>
4040 + <size key="headerReferenceSize" width="0.0" height="0.0"/>
4041 + <size key="footerReferenceSize" width="0.0" height="0.0"/>
4042 + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
4043 + </collectionViewFlowLayout>
4044 + <cells>
4045 + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ScreenCollectionViewCellId" id="oyy-X4-NUR">
4046 + <rect key="frame" x="0.0" y="-14" width="128" height="128"/>
4001 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 4047 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
4002 - <fontDescription key="fontDescription" type="system" pointSize="17"/> 4048 + <collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="neg-3H-s9N">
4003 - <nil key="textColor"/> 4049 + <rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
4004 - <nil key="highlightedColor"/> 4050 + <autoresizingMask key="autoresizingMask"/>
4005 - </label> 4051 + <subviews>
4052 + <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9OA-DS-AH2">
4053 + <rect key="frame" x="-56" y="0.0" width="240" height="128"/>
4054 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
4055 + <color key="backgroundColor" systemColor="systemBackgroundColor"/>
4056 + </view>
4057 + </subviews>
4058 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
4059 + </collectionViewCellContentView>
4060 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
4061 + </collectionViewCell>
4062 + </cells>
4063 + <connections>
4064 + <outlet property="dataSource" destination="zKA-A2-Dl8" id="w99-xJ-kNH"/>
4065 + <outlet property="delegate" destination="zKA-A2-Dl8" id="5TJ-rJ-Wtb"/>
4066 + </connections>
4067 + </collectionView>
4068 + </subviews>
4069 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
4070 + <constraints>
4071 + <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"/>
4073 + <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"/>
4075 + </constraints>
4076 + </view>
4077 + </subviews>
4078 + <color key="backgroundColor" systemColor="systemBackgroundColor"/>
4079 + <constraints>
4080 + <constraint firstItem="ZDd-1H-T7x" firstAttribute="leading" secondItem="XsW-fz-6VQ" secondAttribute="leading" id="LSl-4t-R39"/>
4081 + <constraint firstItem="Iq3-R0-fBz" firstAttribute="leading" secondItem="XsW-fz-6VQ" secondAttribute="leading" id="PAL-j8-olw"/>
4082 + <constraint firstAttribute="trailing" secondItem="Iq3-R0-fBz" secondAttribute="trailing" id="PLY-Y8-vLt"/>
4083 + <constraint firstAttribute="trailing" secondItem="ZDd-1H-T7x" secondAttribute="trailing" id="eYH-Gm-SBy"/>
4084 + <constraint firstItem="ZDd-1H-T7x" firstAttribute="top" secondItem="Iq3-R0-fBz" secondAttribute="bottom" id="rhx-zr-AVs"/>
4085 + <constraint firstItem="Iq3-R0-fBz" firstAttribute="top" secondItem="XsW-fz-6VQ" secondAttribute="top" id="rqp-ps-RYb"/>
4086 + </constraints>
4087 + </view>
4006 </subviews> 4088 </subviews>
4007 <viewLayoutGuide key="safeArea" id="LGo-tV-2gt"/> 4089 <viewLayoutGuide key="safeArea" id="LGo-tV-2gt"/>
4008 <color key="backgroundColor" red="0.90588235294117647" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/> 4090 <color key="backgroundColor" red="0.90588235294117647" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/>
4091 + <constraints>
4092 + <constraint firstItem="XsW-fz-6VQ" firstAttribute="top" secondItem="YeC-iK-Hrq" secondAttribute="top" id="9aT-5y-PCz"/>
4093 + <constraint firstAttribute="trailing" secondItem="XsW-fz-6VQ" secondAttribute="trailing" id="Mx2-Mi-Nce"/>
4094 + <constraint firstAttribute="bottom" secondItem="XsW-fz-6VQ" secondAttribute="bottom" id="TBM-Aw-cOy"/>
4095 + <constraint firstItem="XsW-fz-6VQ" firstAttribute="leading" secondItem="YeC-iK-Hrq" secondAttribute="leading" id="VBc-Ml-tkW"/>
4096 + </constraints>
4009 </view> 4097 </view>
4098 + <connections>
4099 + <outlet property="closeImage" destination="b5d-hX-vcb" id="esI-7p-Ycc"/>
4100 + <outlet property="headerView" destination="Iq3-R0-fBz" id="E4T-bn-yYD"/>
4101 + <outlet property="logoImage" destination="GZK-rw-pZV" id="qwb-ae-QFc"/>
4102 + </connections>
4010 </viewController> 4103 </viewController>
4011 <placeholder placeholderIdentifier="IBFirstResponder" id="8tp-Sb-5gi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> 4104 <placeholder placeholderIdentifier="IBFirstResponder" id="8tp-Sb-5gi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
4012 </objects> 4105 </objects>
......