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
2023-04-12 14:35:07 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2831f094c245b57b0e42794031cb1f63c9162816
2831f094
1 parent
6b249079
redesign WalletViewController v1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
65 deletions
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
2831f09
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
2831f09
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2831f09
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
2831f09
...
...
@@ -9,9 +9,18 @@
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"BTCosmo-Bold.ttf"
>
<string>
BTCosmo-Bold
</string>
</array>
<array
key=
"PeridotPE-Bold.ttf"
>
<string>
PeridotPE-Bold
</string>
</array>
<array
key=
"PeridotPE-Regular.ttf"
>
<string>
PeridotPE-Regular
</string>
</array>
<array
key=
"PeridotPE-SemiBold.ttf"
>
<string>
PeridotPE-SBold
</string>
</array>
<array
key=
"pf_square_sans_pro_bold.ttf"
>
<string>
PFSquareSansPro-Bold
</string>
</array>
...
...
@@ -1312,7 +1321,7 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Et1-y7-npI"
userLabel=
"HeaderView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"663"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"ic_background_
circle
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wP5-YG-vSP"
>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"ic_background_
straight
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wP5-YG-vSP"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"663"
/>
</imageView>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wJv-NF-rMf"
>
...
...
@@ -1323,15 +1332,15 @@
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Γιώργος Γεωργίου"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1XZ-NB-F8P"
>
<rect
key=
"frame"
x=
"20"
y=
"105"
width=
"374"
height=
"
16
"
/>
<fontDescription
key=
"fontDescription"
name=
"P
FSquareSansPro-Regular"
family=
"PF Square Sans Pro"
pointSize=
"16
"
/>
<color
key=
"textColor"
red=
"0.
25490196079999999"
green=
"0.33333333329999998"
blue=
"0.3921568627"
alpha=
"1"
colorSpace=
"custom"
customC
olorSpace=
"calibratedRGB"
/>
<rect
key=
"frame"
x=
"20"
y=
"105"
width=
"374"
height=
"
21
"
/>
<fontDescription
key=
"fontDescription"
name=
"P
eridotPE-Bold"
family=
"Peridot PE"
pointSize=
"17
"
/>
<color
key=
"textColor"
red=
"0.
12941176470588234"
green=
"0.12941176470588234"
blue=
"0.12941176470588234"
alpha=
"1"
c
olorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"system"
lineBreakMode=
"tailTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"UNL-Oh-sPV"
>
<rect
key=
"frame"
x=
"17
6.5"
y=
"131"
width=
"61"
height=
"512
"
/>
<rect
key=
"frame"
x=
"17
2"
y=
"136"
width=
"70"
height=
"507
"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<fontDescription
key=
"fontDescription"
name=
"P
FSquareSansPro-Medium"
family=
"PF Square Sans Pro"
pointSize=
"14
"
/>
<fontDescription
key=
"fontDescription"
name=
"P
eridotPE-Bold"
family=
"Peridot PE"
pointSize=
"15
"
/>
<inset
key=
"contentEdgeInsets"
minX=
"10"
minY=
"5"
maxX=
"10"
maxY=
"5"
/>
<inset
key=
"imageEdgeInsets"
minX=
"0.0"
minY=
"0.0"
maxX=
"2.2250738585072014e-308"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"Button"
>
...
...
@@ -1598,9 +1607,9 @@
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"SIP-ou-T3X"
>
<rect
key=
"frame"
x=
"0.0"
y=
"125"
width=
"374"
height=
"1
6
"
/>
<fontDescription
key=
"fontDescription"
name=
"P
FSquareSansPro-Regular"
family=
"PF Square Sans Pro"
pointSize=
"16
"
/>
<color
key=
"textColor"
red=
"
1"
green=
"1"
blue=
"1"
alpha=
"0.60999999999999999"
colorSpace=
"custom"
customC
olorSpace=
"calibratedRGB"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"125"
width=
"374"
height=
"1
8.5
"
/>
<fontDescription
key=
"fontDescription"
name=
"P
eridotPE-Regular"
family=
"Peridot PE"
pointSize=
"15
"
/>
<color
key=
"textColor"
red=
"
0.12941176470588234"
green=
"0.12941176470588234"
blue=
"0.12941176470588234"
alpha=
"1"
c
olorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
...
...
@@ -1615,7 +1624,7 @@
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"0.
21960784310000001"
green=
"0.32156862749999998"
blue=
"0.4039215686"
alpha=
"1"
colorSpace=
"custom"
customC
olorSpace=
"calibratedRGB"
/>
<color
key=
"backgroundColor"
red=
"0.
94901960784313721"
green=
"0.94901960784313721"
blue=
"0.95294117647058818"
alpha=
"1"
c
olorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstItem=
"8YP-uG-vbV"
firstAttribute=
"leading"
secondItem=
"ICd-s2-mfF"
secondAttribute=
"leading"
constant=
"20"
id=
"34j-DQ-Raf"
/>
<constraint
firstItem=
"gdf-s4-2CF"
firstAttribute=
"top"
secondItem=
"Fef-hi-2VL"
secondAttribute=
"bottom"
constant=
"40"
id=
"4FL-Zz-Okv"
/>
...
...
@@ -2207,7 +2216,7 @@
</connections>
</tableView>
</subviews>
<color
key=
"backgroundColor"
red=
"0.
2196078431372549"
green=
"0.32156862745098036"
blue=
"0.40392156862745099"
alpha=
"1"
colorSpace=
"custom"
customC
olorSpace=
"calibratedRGB"
/>
<color
key=
"backgroundColor"
red=
"0.
94901960784313721"
green=
"0.94901960784313721"
blue=
"0.95294117647058818"
alpha=
"1"
c
olorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstItem=
"jYz-96-Lp1"
firstAttribute=
"top"
secondItem=
"VHx-uN-GE4"
secondAttribute=
"top"
id=
"5Xw-UM-jF7"
/>
<constraint
firstItem=
"jYz-96-Lp1"
firstAttribute=
"leading"
secondItem=
"VHx-uN-GE4"
secondAttribute=
"leading"
id=
"bfu-UW-7CF"
/>
...
...
@@ -2675,18 +2684,18 @@
<color
key=
"textColor"
red=
"0.3803921569"
green=
"0.4431372549"
blue=
"0.50588235290000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
ambiguous=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"G6f-Nu-2R5"
>
<rect
key=
"frame"
x=
"119"
y=
"
77"
width=
"58.5"
height=
"21
"
/>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"G6f-Nu-2R5"
>
<rect
key=
"frame"
x=
"119"
y=
"
24"
width=
"58.5"
height=
"0.0
"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
ambiguous=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LGs-y6-UbY"
>
<rect
key=
"frame"
x=
"5"
y=
"3"
width=
"15"
height=
"
15
"
/>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LGs-y6-UbY"
>
<rect
key=
"frame"
x=
"5"
y=
"3"
width=
"15"
height=
"
0.0
"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"15"
id=
"9tK-aY-Rdn"
/>
<constraint
firstAttribute=
"width"
constant=
"15"
id=
"m2Y-SE-d4q"
/>
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
ambiguous=
"YES"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dF5-HE-P9n"
>
<rect
key=
"frame"
x=
"25"
y=
"
4.5
"
width=
"28.5"
height=
"12"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"dF5-HE-P9n"
>
<rect
key=
"frame"
x=
"25"
y=
"
-6
"
width=
"28.5"
height=
"12"
/>
<fontDescription
key=
"fontDescription"
name=
"PFSquareSansPro-Medium"
family=
"PF Square Sans Pro"
pointSize=
"12"
/>
<color
key=
"textColor"
red=
"0.3803921569"
green=
"0.4431372549"
blue=
"0.50588235290000005"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -2757,10 +2766,10 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"UnifiedCouponBCFooterTableViewCell"
id=
"LD5-ES-J67"
customClass=
"UnifiedCouponBCFooterTableViewCell"
customModule=
"SwiftWarplyFramework"
>
<rect
key=
"frame"
x=
"0.0"
y=
"1010.5"
width=
"414"
height=
"
189
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"1010.5"
width=
"414"
height=
"
44
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"LD5-ES-J67"
id=
"DmN-AA-8n5"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"
189
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"
44
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"L4W-1e-9fQ"
>
...
...
@@ -3209,10 +3218,10 @@
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Zdf-1r-FdJ"
userLabel=
"Coupon View"
>
<rect
key=
"frame"
x=
"150.5"
y=
"415"
width=
"113
.5
"
height=
"55"
/>
<rect
key=
"frame"
x=
"150.5"
y=
"415"
width=
"113"
height=
"55"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"BJS-kk-CBZ"
customClass=
"CopyableLabel"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"20"
y=
"10.5"
width=
"73
.5"
height=
"34.5
"
/>
<rect
key=
"frame"
x=
"20"
y=
"10.5"
width=
"73
"
height=
"34
"
/>
<fontDescription
key=
"fontDescription"
name=
"PeridotPE-Bold"
family=
"Peridot PE"
pointSize=
"28"
/>
<color
key=
"textColor"
red=
"0.12941176470588234"
green=
"0.12941176470588234"
blue=
"0.12941176470588234"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -4654,7 +4663,7 @@
<image
name=
"coupons_scrollview_white"
width=
"214"
height=
"462"
/>
<image
name=
"curved_bg_white"
width=
"159.5"
height=
"118.5"
/>
<image
name=
"dfy_logo_white"
width=
"1611"
height=
"395"
/>
<image
name=
"ic_background_
circle"
width=
"214"
height=
"134
"
/>
<image
name=
"ic_background_
straight"
width=
"214"
height=
"133
"
/>
<image
name=
"ic_close_2"
width=
"17"
height=
"17.5"
/>
<image
name=
"ic_down_dark"
width=
"24"
height=
"24"
/>
<image
name=
"new_icon"
width=
"37"
height=
"17"
/>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
2831f09
...
...
@@ -102,7 +102,8 @@ import SwiftEventBus
// dfyCoupons = swiftApi().getActiveDFYCoupons()
// TODO: DELETE <===
getUnifiedCouponsRequest
()
// TODO: Uncomment when UnifiedCoupons will be shown again
// getUnifiedCouponsRequest()
setBackButton
()
setNavigationTitle
(
"My Rewards"
)
...
...
@@ -123,11 +124,13 @@ import SwiftEventBus
dfyLogoImage
.
image
=
UIImage
(
named
:
"dfy_logo_colored"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
activeCodeImage
.
image
=
UIImage
(
named
:
"active_code_logo"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
profileImage
.
layer
.
cornerRadius
=
32.5
if
(
profile
!=
nil
&&
!
(
profile
?
.
_image_url
is
NSNull
)
&&
profile
?
.
_image_url
!=
nil
&&
profile
?
.
_image_url
!=
""
)
{
profileImage
.
layer
.
cornerRadius
=
19
profileImage
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMaxXMaxYCorner
]
// Top left, bottom right corner radius
profileImage
.
layer
.
borderWidth
=
1
profileImage
.
layer
.
borderColor
=
UIColor
(
red
:
0.13
,
green
:
0.66
,
blue
:
0.71
,
alpha
:
1.00
)
.
cgColor
profileImage
.
layer
.
borderColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
.
cgColor
if
(
profile
!=
nil
&&
!
(
profile
?
.
_image_url
is
NSNull
)
&&
profile
?
.
_image_url
!=
nil
&&
profile
?
.
_image_url
!=
""
)
{
profileImage
.
load
(
link
:
profile
?
.
_image_url
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
}
else
{
profileImage
.
image
=
UIImage
(
named
:
"default_profile_image_2"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
...
...
@@ -141,28 +144,36 @@ import SwiftEventBus
print
(
"User tag: "
+
userTag
)
if
(
userTag
!=
""
&&
userTag
!=
"undefined"
)
{
questionnaireButton
.
setTitle
(
userTag
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
14
)
questionnaireButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
// questionnaireButton.sizeToFit()
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
26
)
questionnaireButton
.
applyGradient
(
colours
:
[
UIColor
(
red
:
0.40
,
green
:
0.77
,
blue
:
0.28
,
alpha
:
1.00
),
UIColor
(
red
:
0.10
,
green
:
0.66
,
blue
:
0.72
,
alpha
:
1.00
)],
gradient
:
GradientOrientation
.
horizontal
,
cornerRadius
:
7.0
)
// Shadow Color
questionnaireButton
.
layer
.
shadowColor
=
UIColor
(
red
:
0.33
,
green
:
0.38
,
blue
:
0.43
,
alpha
:
1.00
)
.
cgColor
questionnaireButton
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
2.0
)
questionnaireButton
.
layer
.
shadowOpacity
=
1.0
questionnaireButton
.
layer
.
shadowRadius
=
0.0
questionnaireButton
.
layer
.
masksToBounds
=
false
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
7
,
left
:
10
,
bottom
:
3
,
right
:
10
)
// questionnaireButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 15
)
//
questionnaireButton.setTitleColor(.white, for: .normal)
//
// questionnaireButton.sizeToFit()
//
questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26)
//
questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0)
//
// Shadow Color
//
questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor
//
questionnaireButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
//
questionnaireButton.layer.shadowOpacity = 1.0
//
questionnaireButton.layer.shadowRadius = 0.0
//
questionnaireButton.layer.masksToBounds = false
//
questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 7, left: 10, bottom: 3, right: 10)
}
else
{
questionnaireButton
.
setTitle
(
"+Προτιμήσεις"
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
14
)
questionnaireButton
.
setTitleColor
(
UIColor
(
red
:
0.31
,
green
:
0.62
,
blue
:
0.18
,
alpha
:
1.00
),
for
:
.
normal
)
questionnaireButton
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
26
)
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
5
,
left
:
10
,
bottom
:
5
,
right
:
10
)
// questionnaireButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 15
)
// questionnaireButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00
, alpha: 1.00), for: .normal)
// questionnaireButton.backgroundColor = .clear
//
questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26)
//
questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10)
}
questionnaireButton
.
layer
.
cornerRadius
=
7.0
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
15
)
questionnaireButton
.
setTitleColor
(
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
),
for
:
.
normal
)
questionnaireButton
.
backgroundColor
=
.
clear
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
42
)
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
12
,
left
:
20
,
bottom
:
12
,
right
:
20
)
questionnaireButton
.
layer
.
cornerRadius
=
15.0
questionnaireButton
.
layer
.
borderWidth
=
2
questionnaireButton
.
layer
.
borderColor
=
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
.
cgColor
dfyEarnBannerView
.
layer
.
cornerRadius
=
5.0
dfyEarnBannerView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.16
)
.
cgColor
...
...
@@ -407,18 +418,18 @@ import SwiftEventBus
if
(
questionnaireButton
.
currentTitle
!=
userTag
)
{
if
(
userTag
!=
""
&&
userTag
!=
"undefined"
)
{
questionnaireButton
.
setTitle
(
userTag
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
14
)
questionnaireButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
// questionnaireButton.sizeToFit()
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
26
)
questionnaireButton
.
applyGradient
(
colours
:
[
UIColor
(
red
:
0.40
,
green
:
0.77
,
blue
:
0.28
,
alpha
:
1.00
),
UIColor
(
red
:
0.10
,
green
:
0.66
,
blue
:
0.72
,
alpha
:
1.00
)],
gradient
:
GradientOrientation
.
horizontal
,
cornerRadius
:
7.0
)
// Shadow Color
questionnaireButton
.
layer
.
shadowColor
=
UIColor
(
red
:
0.33
,
green
:
0.38
,
blue
:
0.43
,
alpha
:
1.00
)
.
cgColor
questionnaireButton
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
2.0
)
questionnaireButton
.
layer
.
shadowOpacity
=
1.0
questionnaireButton
.
layer
.
shadowRadius
=
0.0
questionnaireButton
.
layer
.
masksToBounds
=
false
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
7
,
left
:
10
,
bottom
:
3
,
right
:
10
)
//
questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14)
//
questionnaireButton.setTitleColor(.white, for: .normal)
//
// questionnaireButton.sizeToFit()
//
questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26)
//
questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0)
//
// Shadow Color
//
questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor
//
questionnaireButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
//
questionnaireButton.layer.shadowOpacity = 1.0
//
questionnaireButton.layer.shadowRadius = 0.0
//
questionnaireButton.layer.masksToBounds = false
//
questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 7, left: 10, bottom: 3, right: 10)
}
else
{
for
layer
in
(
questionnaireButton
.
layer
.
sublayers
??
[])
{
if
(
layer
.
name
==
"linearGradientLayer"
){
...
...
@@ -427,17 +438,26 @@ import SwiftEventBus
}
questionnaireButton
.
layer
.
shadowOpacity
=
0.0
;
questionnaireButton
.
setTitle
(
"+Προτιμήσεις"
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
14
)
questionnaireButton
.
setTitleColor
(
UIColor
(
red
:
0.31
,
green
:
0.62
,
blue
:
0.18
,
alpha
:
1.00
),
for
:
.
normal
)
questionnaireButton
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
26
)
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
5
,
left
:
10
,
bottom
:
5
,
right
:
10
)
//
questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14)
//
questionnaireButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal)
//
questionnaireButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00)
//
questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26)
//
questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10)
}
questionnaireButton
.
layer
.
cornerRadius
=
7.0
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PeridotPE-Bold"
,
size
:
15
)
questionnaireButton
.
setTitleColor
(
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
),
for
:
.
normal
)
questionnaireButton
.
backgroundColor
=
.
clear
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
42
)
questionnaireButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
12
,
left
:
20
,
bottom
:
12
,
right
:
20
)
questionnaireButton
.
layer
.
cornerRadius
=
15.0
questionnaireButton
.
layer
.
borderWidth
=
2
questionnaireButton
.
layer
.
borderColor
=
UIColor
(
red
:
0.05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
.
cgColor
}
self
.
coupons
=
swiftApi
()
.
getCouponList
()
self
.
unifiedCoupons
=
swiftApi
()
.
getUnifiedCouponList
()
// TODO: Uncomment when UnifiedCoupons will be shown again
// self.unifiedCoupons = swiftApi().getUnifiedCouponList()
self
.
updateMarketBadge
()
self
.
tableView
.
reloadData
()
...
...
Please
register
or
login
to post a comment