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-10-11 11:36:14 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ad497a90e40393cb286df362a1ce1f1317a0f9de
ad497a90
1 parent
fc026813
fix button and nav title font size
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
ad497a9
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
ad497a9
...
...
@@ -74,7 +74,6 @@ import SwiftEventBus
let
htmlDescrText
=
couponset
?
.
description
??
""
descriptionLabel
.
text
=
htmlDescrText
.
htmlToString
redeemButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
redeemButton
.
setTitle
(
"Απόκτησέ το"
,
for
:
.
normal
)
redeemButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
redeemButton
.
backgroundColor
=
UIColor
(
red
:
0.47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
...
...
@@ -82,9 +81,11 @@ import SwiftEventBus
// Fix width for ipad
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
pad
{
// iPad
redeemButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
19
)
redeemButton
.
widthAnchor
.
constraint
(
equalToConstant
:
250
)
.
isActive
=
true
}
else
{
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
redeemButton
.
widthAnchor
.
constraint
(
equalTo
:
view
.
widthAnchor
,
multiplier
:
0.6
)
.
isActive
=
true
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
View file @
ad497a9
...
...
@@ -104,10 +104,22 @@ extension UIViewController {
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
uiscreen
.
width
*
0.7
,
height
:
uiscreen
.
height
*
0.03
))
titleLabel
.
text
=
title
titleLabel
.
textColor
=
UIColor
(
red
:
0.21
,
green
:
0.32
,
blue
:
0.41
,
alpha
:
1.00
)
if
(
fontWeight
==
"bold"
)
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Bold"
,
size
:
17
)
// Fix width for ipad
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
pad
{
// iPad
if
(
fontWeight
==
"bold"
)
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Bold"
,
size
:
20
)
}
else
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
20
)
}
}
else
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
17
)
// not iPad (iPhone, mac, tv, carPlay, unspecified)
if
(
fontWeight
==
"bold"
)
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Bold"
,
size
:
17
)
}
else
{
titleLabel
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
17
)
}
}
titleLabel
.
adjustsFontSizeToFitWidth
=
true
titleLabel
.
textAlignment
=
.
center
...
...
Please
register
or
login
to post a comment