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-13 11:20:11 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38f08e960260fdedbfc9df93ea84273fa8c74dde
38f08e96
1 parent
f7a9e646
redesign WalletViewController v2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
41 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/ActiveCodeTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
38f08e9
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
38f08e9
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
38f08e9
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/ActiveCodeTableViewCell.swift
View file @
38f08e9
...
...
@@ -48,11 +48,13 @@ import UIKit
// dfyCoupons = swiftApi().getActiveDFYCoupons()
// TODO: DELETE <===
activeCodeView
.
layer
.
cornerRadius
=
5.0
activeCodeView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.16
)
.
cgColor
activeCodeView
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
0.0
)
activeCodeView
.
layer
.
shadowOpacity
=
1.0
activeCodeView
.
layer
.
shadowRadius
=
6.0
activeCodeView
.
layer
.
cornerRadius
=
16.5
activeCodeView
.
layer
.
borderWidth
=
1
activeCodeView
.
layer
.
borderColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
.
cgColor
// activeCodeView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor
// activeCodeView.layer.shadowOffset = CGSize(width: 0.0, height: 0.0)
// activeCodeView.layer.shadowOpacity = 1.0
// activeCodeView.layer.shadowRadius = 6.0
activeCodeImage
.
image
=
UIImage
(
named
:
"active_code_logo_2"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
...
...
@@ -90,8 +92,8 @@ import UIKit
// activeCodeLabel.text = dfyCoupons[0]._code
let
newLabel
=
CopyableLabel
()
newLabel
.
text
=
String
(
dfyCoupons
[
0
]
.
_code
)
newLabel
.
font
=
UIFont
(
name
:
"P
FSquareSansPro-Bold"
,
size
:
19
)
newLabel
.
textColor
=
UIColor
(
r
gb
:
0x3C5365
)
newLabel
.
font
=
UIFont
(
name
:
"P
eridotPE-Bold"
,
size
:
18
)
newLabel
.
textColor
=
UIColor
(
r
ed
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
newLabel
.
frame
.
size
.
width
=
newLabel
.
intrinsicContentSize
.
width
newLabel
.
frame
.
size
.
height
=
newLabel
.
intrinsicContentSize
.
height
// tagHeight
activeCodeContentView
.
addSubview
(
newLabel
)
...
...
@@ -123,8 +125,8 @@ import UIKit
// var couponCodesString = ""
for
(
index
,
item
)
in
dfyCoupons
.
enumerated
()
{
let
newLabel
=
CopyableLabel
()
newLabel
.
font
=
UIFont
(
name
:
"P
FSquareSansPro-Bold"
,
size
:
19
)
newLabel
.
textColor
=
UIColor
(
r
gb
:
0x3C5365
)
newLabel
.
font
=
UIFont
(
name
:
"P
eridotPE-Bold"
,
size
:
18
)
newLabel
.
textColor
=
UIColor
(
r
ed
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
if
(
index
==
(
dfyCoupons
.
endIndex
-
1
))
{
// couponCodesString += String(item._code)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
38f08e9
This diff could not be displayed because it is too large.
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
38f08e9
...
...
@@ -17,12 +17,14 @@ import SwiftEventBus
@IBOutlet
weak
var
dfyEarnBannerView
:
UIView
!
@IBOutlet
weak
var
dfyEarnBannerHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
dfyEarnBannerTopSpace
:
NSLayoutConstraint
!
@IBOutlet
weak
var
dfyEarnBannerInnerView
:
UIView
!
@IBOutlet
weak
var
dfyEarnLabel
:
UILabel
!
@IBOutlet
weak
var
dfyEarnAmountLabel
:
UILabel
!
@IBOutlet
weak
var
dfyEarnImage
:
UIImageView
!
@IBOutlet
weak
var
couponEarnView
:
UIView
!
@IBOutlet
weak
var
couponEarnViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
couponEarnViewTopSpace
:
NSLayoutConstraint
!
@IBOutlet
weak
var
couponEarnInnerView
:
UIView
!
@IBOutlet
weak
var
couponEarnLabel
:
UILabel
!
@IBOutlet
weak
var
couponEarnAmountLabel
:
UILabel
!
@IBOutlet
weak
var
couponEarnImage
:
UIImageView
!
...
...
@@ -175,11 +177,14 @@ import SwiftEventBus
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
dfyEarnBannerView
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
3.0
)
dfyEarnBannerView
.
layer
.
shadowOpacity
=
1.0
dfyEarnBannerView
.
layer
.
shadowRadius
=
3.0
dfyEarnBannerInnerView
.
layer
.
cornerRadius
=
16.5
dfyEarnBannerInnerView
.
layer
.
borderWidth
=
1
dfyEarnBannerInnerView
.
layer
.
borderColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
.
cgColor
// dfyEarnBannerView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor
// dfyEarnBannerView.layer.shadowOffset = CGSize(width: 0.0, height: 3.0)
// dfyEarnBannerView.layer.shadowOpacity = 1.0
// dfyEarnBannerView.layer.shadowRadius = 3.0
// var totalCouponValue = swiftApi().getDealsCouponsSum()
...
...
@@ -205,8 +210,8 @@ import SwiftEventBus
let
boldText
=
totalCouponValueString
+
"€"
let
normalText2
=
" με το DEALS for YOU!"
let
attrRegular
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"P
FSquareSansPro-Regular"
,
size
:
17
)
??
UIFont
.
systemFont
(
ofSize
:
16
)]
let
attrBold
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"P
FSquareSansPro-Bold"
,
size
:
17
)
??
UIFont
.
boldSystemFont
(
ofSize
:
16
)]
let
attrRegular
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"P
eridotPE-Regular"
,
size
:
14
)
??
UIFont
.
systemFont
(
ofSize
:
13
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)]
let
attrBold
=
[
NSAttributedString
.
Key
.
font
:
UIFont
(
name
:
"P
eridotPE-Bold"
,
size
:
14
)
??
UIFont
.
boldSystemFont
(
ofSize
:
13
),
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)]
let
attributedString
=
NSMutableAttributedString
(
string
:
normalText1
,
attributes
:
attrRegular
)
let
boldString
=
NSMutableAttributedString
(
string
:
boldText
,
attributes
:
attrBold
)
...
...
@@ -217,6 +222,7 @@ import SwiftEventBus
dfyEarnLabel
.
attributedText
=
attributedString
dfyEarnAmountLabel
.
text
=
totalCouponValueString
+
"€"
// dfyEarnAmountLabel.font = UIFont(name: "PeridotPE-Bold", size: 14)
if
(
loyaltyBadge
.
_couponCount
==
0
)
{
couponEarnView
.
isHidden
=
true
...
...
@@ -226,15 +232,22 @@ import SwiftEventBus
}
else
{
couponEarnView
.
isHidden
=
false
couponEarnViewHeight
.
constant
=
75
if
(
totalCouponValue
==
0.0
)
{
couponEarnViewTopSpace
.
constant
=
30
}
else
{
couponEarnViewTopSpace
.
constant
=
15
}
}
couponEarnView
.
layer
.
cornerRadius
=
5.0
couponEarnView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.16
)
.
cgColor
couponEarnView
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
3.0
)
couponEarnView
.
layer
.
shadowOpacity
=
1.0
couponEarnView
.
layer
.
shadowRadius
=
3.0
couponEarnInnerView
.
layer
.
cornerRadius
=
16.5
couponEarnInnerView
.
layer
.
borderWidth
=
1
couponEarnInnerView
.
layer
.
borderColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
.
cgColor
// couponEarnView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor
// couponEarnView.layer.shadowOffset = CGSize(width: 0.0, height: 3.0)
// couponEarnView.layer.shadowOpacity = 1.0
// couponEarnView.layer.shadowRadius = 3.0
// let totalCouponDiscount = Float(round(100 * loyaltyBadge._value) / 100)
var
totalCouponDiscountString
=
"0"
...
...
@@ -391,7 +404,7 @@ import SwiftEventBus
dfyLogoImageHeight
.
constant
=
0
activeCodeViewHeight
.
constant
=
0
dfyLogoImageTopSpace
.
constant
=
0
//
dfyLogoImageTopSpace.constant = 0
}
myPresentsLabel
.
text
=
"Τα δώρα μου"
...
...
@@ -684,11 +697,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
public
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
(
section
==
0
)
{
if
(
self
.
totalCouponValue
==
0.0
&&
self
.
loyaltyBadge
.
_couponCount
==
0
&&
self
.
unifiedCouponsDiscount
==
0.0
)
{
// TODO: Uncomment when UnifiedCoupons will be shown again
// if (self.totalCouponValue == 0.0 && self.loyaltyBadge._couponCount == 0 && self.unifiedCouponsDiscount == 0.0) {
return
0
}
else
{
return
1
}
//
} else {
//
return 1
//
}
}
else
if
(
section
==
1
)
{
return
self
.
unifiedCoupons
.
count
}
else
if
(
section
==
2
)
{
...
...
@@ -706,11 +720,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
public
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
(
indexPath
.
section
==
0
)
{
if
(
self
.
totalCouponValue
==
0.0
&&
self
.
loyaltyBadge
.
_couponCount
==
0
&&
self
.
unifiedCouponsDiscount
==
0.0
)
{
// TODO: Uncomment when UnifiedCoupons will be shown again
// if (self.totalCouponValue == 0.0 && self.loyaltyBadge._couponCount == 0 && self.unifiedCouponsDiscount == 0.0) {
return
0.0
}
else
{
return
UITableView
.
automaticDimension
}
//
} else {
//
return UITableView.automaticDimension
//
}
}
else
if
(
indexPath
.
section
==
1
)
{
if
(
self
.
unifiedCoupons
.
count
>
0
)
{
return
120.0
+
8.0
...
...
@@ -744,9 +759,9 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
75
))
view
.
backgroundColor
=
.
clear
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
40
,
width
:
view
.
frame
.
width
-
40
,
height
:
2
1
))
titleLabel
.
font
=
UIFont
(
name
:
"
PFSquareSansPro-Medium"
,
size
:
21
)
titleLabel
.
textColor
=
UIColor
(
r
gb
:
0xFFFFFF
)
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
40
,
width
:
view
.
frame
.
width
-
40
,
height
:
2
0
))
titleLabel
.
font
=
UIFont
(
name
:
"
BTCosmo-Bold"
,
size
:
20
)
titleLabel
.
textColor
=
UIColor
(
r
ed
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
titleLabel
.
text
=
"COSMOTE SuperMarket Deals"
view
.
addSubview
(
titleLabel
)
...
...
@@ -758,11 +773,12 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
}
else
if
(
section
==
2
)
{
if
(
self
.
dfyCoupons
.
count
>
0
)
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
6
8
))
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
6
5
))
view
.
backgroundColor
=
.
clear
let
imageView
=
UIImageView
(
frame
:
CGRect
(
x
:
20
,
y
:
20
,
width
:
view
.
frame
.
width
/
3.5
,
height
:
38
))
let
imageView
=
UIImageView
(
frame
:
CGRect
(
x
:
20
,
y
:
30
,
width
:
view
.
frame
.
width
/
2
,
height
:
25
))
imageView
.
contentMode
=
.
scaleAspectFit
// imageView.backgroundColor = .red
if
let
dfyHeaderImage
=
UIImage
(
named
:
"dfy_logo_colored"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
{
imageView
.
image
=
dfyHeaderImage
...
...
@@ -783,10 +799,10 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
view
.
backgroundColor
=
.
clear
// let titleLabel = UILabel(frame: CGRect(x: 20, y: 40, width: view.frame.width - 40, height: 21))
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
30
,
width
:
view
.
frame
.
width
-
40
,
height
:
2
1
))
titleLabel
.
font
=
UIFont
(
name
:
"
PFSquareSansPro-Medium"
,
size
:
21
)
titleLabel
.
textColor
=
UIColor
(
r
gb
:
0xFFFFFF
)
titleLabel
.
text
=
"
Τα δώρα μου
"
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
30
,
width
:
view
.
frame
.
width
-
40
,
height
:
2
0
))
titleLabel
.
font
=
UIFont
(
name
:
"
BTCosmo-Bold"
,
size
:
20
)
titleLabel
.
textColor
=
UIColor
(
r
ed
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
titleLabel
.
text
=
"
GIFTS for YOU
"
view
.
addSubview
(
titleLabel
)
return
view
...
...
Please
register
or
login
to post a comment