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-06-30 13:36:23 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2a5f00349da0b6caa30a0c0023e762069d117a10
2a5f0034
1 parent
6a78ad2a
fix rerender userTag at WalletVC
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
SwiftWarplyFramework/.DS_Store
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/.DS_Store
View file @
2a5f003
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2a5f003
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
2a5f003
...
...
@@ -163,6 +163,52 @@ import SwiftEventBus
dfyLogoImageTopSpace
.
constant
=
0
}
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
let
userTag
=
swiftApi
()
.
getUserTag
()
if
(
questionnaireButton
.
currentTitle
!=
userTag
)
{
if
(
userTag
!=
""
)
{
questionnaireButton
.
setTitle
(
userTag
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
,
weight
:
.
semibold
)
questionnaireButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
// questionnaireButton.sizeToFit()
questionnaireButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
questionnaireButton
.
intrinsicContentSize
.
width
,
height
:
questionnaireButton
.
intrinsicContentSize
.
height
)
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
}
else
{
questionnaireButton
.
setTitle
(
"+Προτιμήσεις"
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
,
weight
:
.
semibold
)
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
:
questionnaireButton
.
intrinsicContentSize
.
height
)
}
questionnaireButton
.
layer
.
cornerRadius
=
7.0
}
}
public
override
func
viewDidLayoutSubviews
()
{
super
.
viewDidLayoutSubviews
()
if
let
headerView
=
tableView
.
tableHeaderView
{
let
height
=
headerView
.
systemLayoutSizeFitting
(
UIView
.
layoutFittingCompressedSize
)
.
height
var
headerFrame
=
headerView
.
frame
//Comparison necessary to avoid infinite loop
if
height
!=
headerFrame
.
size
.
height
{
headerFrame
.
size
.
height
=
height
headerView
.
frame
=
headerFrame
tableView
.
tableHeaderView
=
headerView
}
}
}
// MARK: - Actions
@IBAction
func
qustionnaireButtonAction
(
_
sender
:
Any
)
{
...
...
Please
register
or
login
to post a comment