Manos Chorianopoulos

add LoyaltyViewController part1

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -8,22 +8,38 @@
import UIKit
@objc public class LoyaltyViewController: UIViewController {
@IBOutlet weak var headerView: UIView!
@IBOutlet weak var closeImage: UIImageView!
@IBOutlet weak var logoImage: UIImageView!
var selectedScreen: String = ""
var filtersList: Array<String> = ["Όλα", "Σπίτι", "Έξοδος", "Υγεία"]
var selectedFilter: String = "Όλα"
public override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
headerView.applyGradient(colours: [UIColor(rgb: 0x081748), UIColor(rgb: 0x204EAC)], gradient: GradientOrientation.horizontal, cornerRadius: 0.0)
closeImage.image = UIImage(named: "close_btn_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
logoImage.image = UIImage(named: "epistrofi_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
}
}
/*
// MARK: - Navigation
extension LoyaltyViewController: UICollectionViewDataSource,UICollectionViewDelegate {
public func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return filtersList.count
}
*/
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ScreenCollectionViewCellId", for: indexPath) as! ScreenCollectionViewCell
// cell.myLabel.text = "ABCD"
return cell;
}
}
......
......@@ -3991,22 +3991,115 @@
<!--Loyalty View Controller-->
<scene sceneID="wdU-7S-AU1">
<objects>
<viewController storyboardIdentifier="LoyaltyViewController" id="zKA-A2-Dl8" customClass="LoyaltyViewController" customModule="SwiftWarplyFramework" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="LoyaltyViewController" id="zKA-A2-Dl8" customClass="LoyaltyViewController" customModule="ResourcesBundle" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="YeC-iK-Hrq">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<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">
<rect key="frame" x="124" y="438" width="166" height="21"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XsW-fz-6VQ" userLabel="Main View">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iq3-R0-fBz" userLabel="Header View">
<rect key="frame" x="0.0" y="0.0" width="414" height="176"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="b5d-hX-vcb">
<rect key="frame" x="379" y="55" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="4pk-Ee-Rch"/>
<constraint firstAttribute="width" constant="15" id="EmR-1K-0QL"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="GZK-rw-pZV">
<rect key="frame" x="20" y="85" width="188" height="51"/>
<constraints>
<constraint firstAttribute="height" constant="51" id="Fql-bQ-fE8"/>
<constraint firstAttribute="width" constant="188" id="c9L-fn-il2"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="b5d-hX-vcb" secondAttribute="trailing" constant="20" id="7b4-MW-wD8"/>
<constraint firstAttribute="bottom" secondItem="GZK-rw-pZV" secondAttribute="bottom" constant="40" id="9Rf-JX-IKb"/>
<constraint firstItem="GZK-rw-pZV" firstAttribute="leading" secondItem="Iq3-R0-fBz" secondAttribute="leading" constant="20" id="BMr-C7-DIL"/>
<constraint firstItem="GZK-rw-pZV" firstAttribute="top" secondItem="b5d-hX-vcb" secondAttribute="bottom" constant="15" id="U6G-sr-YQ8"/>
<constraint firstItem="b5d-hX-vcb" firstAttribute="top" secondItem="Iq3-R0-fBz" secondAttribute="top" constant="55" id="eCY-aR-D9c"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZDd-1H-T7x" userLabel="Filters View">
<rect key="frame" x="0.0" y="176" width="414" height="100"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="3Ff-i2-KRi">
<rect key="frame" x="0.0" y="0.0" width="414" height="100"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="pnI-y1-sVK"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bwb-bV-3Wq">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ScreenCollectionViewCellId" id="oyy-X4-NUR">
<rect key="frame" x="0.0" y="-14" width="128" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="neg-3H-s9N">
<rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9OA-DS-AH2">
<rect key="frame" x="-56" y="0.0" width="240" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</collectionViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="zKA-A2-Dl8" id="w99-xJ-kNH"/>
<outlet property="delegate" destination="zKA-A2-Dl8" id="5TJ-rJ-Wtb"/>
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="3Ff-i2-KRi" firstAttribute="leading" secondItem="ZDd-1H-T7x" secondAttribute="leading" id="BjC-Ge-MmK"/>
<constraint firstAttribute="bottom" secondItem="3Ff-i2-KRi" secondAttribute="bottom" id="VEJ-Z8-lMd"/>
<constraint firstAttribute="trailing" secondItem="3Ff-i2-KRi" secondAttribute="trailing" id="VPb-oz-go1"/>
<constraint firstItem="3Ff-i2-KRi" firstAttribute="top" secondItem="ZDd-1H-T7x" secondAttribute="top" id="ZOb-HP-thS"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ZDd-1H-T7x" firstAttribute="leading" secondItem="XsW-fz-6VQ" secondAttribute="leading" id="LSl-4t-R39"/>
<constraint firstItem="Iq3-R0-fBz" firstAttribute="leading" secondItem="XsW-fz-6VQ" secondAttribute="leading" id="PAL-j8-olw"/>
<constraint firstAttribute="trailing" secondItem="Iq3-R0-fBz" secondAttribute="trailing" id="PLY-Y8-vLt"/>
<constraint firstAttribute="trailing" secondItem="ZDd-1H-T7x" secondAttribute="trailing" id="eYH-Gm-SBy"/>
<constraint firstItem="ZDd-1H-T7x" firstAttribute="top" secondItem="Iq3-R0-fBz" secondAttribute="bottom" id="rhx-zr-AVs"/>
<constraint firstItem="Iq3-R0-fBz" firstAttribute="top" secondItem="XsW-fz-6VQ" secondAttribute="top" id="rqp-ps-RYb"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="LGo-tV-2gt"/>
<color key="backgroundColor" red="0.90588235294117647" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="XsW-fz-6VQ" firstAttribute="top" secondItem="YeC-iK-Hrq" secondAttribute="top" id="9aT-5y-PCz"/>
<constraint firstAttribute="trailing" secondItem="XsW-fz-6VQ" secondAttribute="trailing" id="Mx2-Mi-Nce"/>
<constraint firstAttribute="bottom" secondItem="XsW-fz-6VQ" secondAttribute="bottom" id="TBM-Aw-cOy"/>
<constraint firstItem="XsW-fz-6VQ" firstAttribute="leading" secondItem="YeC-iK-Hrq" secondAttribute="leading" id="VBc-Ml-tkW"/>
</constraints>
</view>
<connections>
<outlet property="closeImage" destination="b5d-hX-vcb" id="esI-7p-Ycc"/>
<outlet property="headerView" destination="Iq3-R0-fBz" id="E4T-bn-yYD"/>
<outlet property="logoImage" destination="GZK-rw-pZV" id="qwb-ae-QFc"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8tp-Sb-5gi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
......