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
2022-08-05 13:20:20 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e3743fbed1413caa78103f6cdf190b1c3d64bd99
e3743fbe
1 parent
c34dedfe
fix banner texts at WalletVC
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e3743fb
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
View file @
e3743fb
...
...
@@ -206,3 +206,9 @@ extension UIViewController
view
.
endEditing
(
true
)
}
}
extension
UIFont
{
class
func
mediumSystemFont
(
ofSize
pointSize
:
CGFloat
)
->
UIFont
{
return
self
.
systemFont
(
ofSize
:
pointSize
,
weight
:
.
medium
)
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
e3743fb
...
...
@@ -126,7 +126,23 @@ import SwiftEventBus
var
totalCouponValueString
=
"0"
totalCouponValueString
=
String
(
format
:
"%.2f"
,
totalCouponValue
)
.
replacingOccurrences
(
of
:
"."
,
with
:
","
,
options
:
.
literal
,
range
:
nil
)
dfyEarnLabel
.
text
=
"Μέχρι τώρα έχεις κερδίσει "
+
totalCouponValueString
+
"€ με το DEALS for YOU!"
// dfyEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponValueString + "€ με το DEALS for YOU!"
let
normalText1
=
"Μέχρι τώρα έχεις κερδίσει "
let
boldText
=
totalCouponValueString
+
"€"
let
normalText2
=
" με το DEALS for YOU!"
let
attrRegular
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
systemFont
(
ofSize
:
16
)]
let
attrBold
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
boldSystemFont
(
ofSize
:
16
)]
let
attributedString
=
NSMutableAttributedString
(
string
:
normalText1
,
attributes
:
attrRegular
)
let
boldString
=
NSMutableAttributedString
(
string
:
boldText
,
attributes
:
attrBold
)
let
normalString
=
NSMutableAttributedString
(
string
:
normalText2
,
attributes
:
attrRegular
)
attributedString
.
append
(
boldString
)
attributedString
.
append
(
normalString
)
dfyEarnLabel
.
attributedText
=
attributedString
dfyEarnAmountLabel
.
text
=
totalCouponValueString
+
"€"
if
(
loyaltyBadge
.
_couponCount
==
0
)
{
...
...
@@ -149,7 +165,26 @@ import SwiftEventBus
var
totalCouponDiscountString
=
"0"
totalCouponDiscountString
=
String
(
format
:
"%.2f"
,
totalCouponDiscount
)
.
replacingOccurrences
(
of
:
"."
,
with
:
","
,
options
:
.
literal
,
range
:
nil
)
couponEarnLabel
.
text
=
"Μέχρι τώρα έχεις κερδίσει "
+
totalCouponDiscountString
+
"€ σε προσφορές από "
+
String
(
loyaltyBadge
.
_couponCount
)
+
" κουπόνια!"
// couponEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponDiscountString + "€ σε προσφορές από " + String(loyaltyBadge._couponCount) + " κουπόνια!"
let
coupNormalText1
=
"Μέχρι τώρα έχεις κερδίσει "
let
coupBoldText
=
totalCouponDiscountString
+
"€"
let
coupNormalText2
=
" σε προσφορές από "
let
coupBoldText2
=
String
(
loyaltyBadge
.
_couponCount
)
let
coupNormalText3
=
" κουπόνια!"
let
coupAttributedString
=
NSMutableAttributedString
(
string
:
coupNormalText1
,
attributes
:
attrRegular
)
let
coupBoldString
=
NSMutableAttributedString
(
string
:
coupBoldText
,
attributes
:
attrBold
)
let
coupNormalString2
=
NSMutableAttributedString
(
string
:
coupNormalText2
,
attributes
:
attrRegular
)
let
coupBoldString2
=
NSMutableAttributedString
(
string
:
coupBoldText2
,
attributes
:
attrBold
)
let
coupNormalString3
=
NSMutableAttributedString
(
string
:
coupNormalText3
,
attributes
:
attrRegular
)
coupAttributedString
.
append
(
coupBoldString
)
coupAttributedString
.
append
(
coupNormalString2
)
coupAttributedString
.
append
(
coupBoldString2
)
coupAttributedString
.
append
(
coupNormalString3
)
couponEarnLabel
.
attributedText
=
attributedString
couponEarnAmountLabel
.
text
=
totalCouponDiscountString
+
"€"
print
(
"Loyalty Badge Value: "
+
totalCouponDiscountString
)
...
...
Please
register
or
login
to post a comment