Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2024-02-07 21:39:17 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
74ef3a0f634eaefa42e9ef2de2b2cab7d9409440
74ef3a0f
1 parent
085780ff
LoyaltyViewController part3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyViewController.swift
View file @
74ef3a0
...
...
@@ -13,6 +13,7 @@ import UIKit
@IBOutlet
weak
var
logoImage
:
UIImageView
!
@IBOutlet
weak
var
filtersView
:
UIView
!
@IBOutlet
weak
var
collectionView
:
UICollectionView
!
@IBOutlet
weak
var
containerView
:
UIView
!
var
selectedScreen
:
String
=
"Offers"
var
filtersList
:
Array
<
String
>
=
[
"Screen"
,
"Όλα"
,
"Σπίτι"
,
"Έξοδος"
,
"Υγεία"
]
...
...
@@ -35,6 +36,33 @@ import UIKit
collectionView
.
contentInset
.
left
=
20
collectionView
.
contentInset
.
right
=
20
loadVC
(
vcName
:
"OffersViewController"
);
}
func
loadVC
(
vcName
:
String
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
var
vc
:
UIViewController
;
if
(
vcName
==
"OffersViewController"
)
{
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"OffersViewController"
)
as!
SwiftWarplyFramework
.
OffersViewController
}
else
{
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"MapViewController"
)
as!
SwiftWarplyFramework
.
MapViewController
}
addChild
(
vc
)
vc
.
view
.
translatesAutoresizingMaskIntoConstraints
=
false
containerView
.
addSubview
(
vc
.
view
)
NSLayoutConstraint
.
activate
([
vc
.
view
.
leadingAnchor
.
constraint
(
equalTo
:
containerView
.
leadingAnchor
,
constant
:
0
),
vc
.
view
.
trailingAnchor
.
constraint
(
equalTo
:
containerView
.
trailingAnchor
,
constant
:
0
),
vc
.
view
.
topAnchor
.
constraint
(
equalTo
:
containerView
.
topAnchor
,
constant
:
0
),
vc
.
view
.
bottomAnchor
.
constraint
(
equalTo
:
containerView
.
bottomAnchor
,
constant
:
0
)
])
vc
.
didMove
(
toParent
:
self
)
}
}
...
...
@@ -66,6 +94,7 @@ extension LoyaltyViewController: UICollectionViewDataSource,UICollectionViewDele
if
(
indexPath
.
row
==
0
)
{
let
offersSelected
=
selectedScreen
==
"Offers"
;
selectedScreen
=
offersSelected
?
"Map"
:
"Offers"
loadVC
(
vcName
:
selectedScreen
==
"Offers"
?
"OffersViewController"
:
"MapViewController"
);
}
else
{
let
currentFilter
=
filtersList
[
indexPath
.
row
];
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
74ef3a0
...
...
@@ -4169,15 +4169,26 @@
<constraint
firstItem=
"3Ff-i2-KRi"
firstAttribute=
"top"
secondItem=
"ZDd-1H-T7x"
secondAttribute=
"top"
constant=
"15"
id=
"ZOb-HP-thS"
/>
</constraints>
</view>
<containerView
opaque=
"NO"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"JYn-ad-sj7"
>
<rect
key=
"frame"
x=
"0.0"
y=
"265"
width=
"414"
height=
"631"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<connections>
<segue
destination=
"B4y-Pl-zNk"
kind=
"embed"
id=
"OPh-Qb-zce"
/>
</connections>
</containerView>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"JYn-ad-sj7"
firstAttribute=
"top"
secondItem=
"ZDd-1H-T7x"
secondAttribute=
"bottom"
id=
"Kua-T7-oY0"
/>
<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=
"JYn-ad-sj7"
secondAttribute=
"trailing"
id=
"WHV-5Y-kAr"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"ZDd-1H-T7x"
secondAttribute=
"trailing"
id=
"eYH-Gm-SBy"
/>
<constraint
firstItem=
"JYn-ad-sj7"
firstAttribute=
"leading"
secondItem=
"XsW-fz-6VQ"
secondAttribute=
"leading"
id=
"n8j-bS-Kg1"
/>
<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"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"JYn-ad-sj7"
secondAttribute=
"bottom"
id=
"woo-KR-rGp"
/>
</constraints>
</view>
</subviews>
...
...
@@ -4193,6 +4204,7 @@
<connections>
<outlet
property=
"closeImage"
destination=
"b5d-hX-vcb"
id=
"esI-7p-Ycc"
/>
<outlet
property=
"collectionView"
destination=
"3Ff-i2-KRi"
id=
"7GZ-4D-yqt"
/>
<outlet
property=
"containerView"
destination=
"JYn-ad-sj7"
id=
"hpH-B5-4uH"
/>
<outlet
property=
"filtersView"
destination=
"ZDd-1H-T7x"
id=
"HUd-Ox-bcV"
/>
<outlet
property=
"headerView"
destination=
"Iq3-R0-fBz"
id=
"E4T-bn-yYD"
/>
<outlet
property=
"logoImage"
destination=
"GZK-rw-pZV"
id=
"qwb-ae-QFc"
/>
...
...
Please
register
or
login
to post a comment