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-05 18:31:46 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f764ddc6b204a13e89130361df05bd51c553ea00
f764ddc6
1 parent
7fdee0bb
fix navbar shadow
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
View file @
f764ddc
...
...
@@ -52,13 +52,6 @@ extension UIViewController {
navigationItem
.
standardAppearance
=
navigationBarAppearance
navigationItem
.
compactAppearance
=
navigationBarAppearance
navigationItem
.
scrollEdgeAppearance
=
navigationBarAppearance
// Add shadow
self
.
navigationController
?
.
navigationBar
.
layer
.
masksToBounds
=
false
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowColor
=
UIColor
.
lightGray
.
cgColor
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowOpacity
=
0.8
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowOffset
=
CGSize
(
width
:
0
,
height
:
2.0
)
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowRadius
=
2
}
...
...
@@ -66,6 +59,15 @@ extension UIViewController {
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
,
completion
:
{})
}
func
addNavShadow
()
{
// Add shadow
self
.
navigationController
?
.
navigationBar
.
layer
.
masksToBounds
=
false
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowColor
=
UIColor
.
lightGray
.
cgColor
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowOpacity
=
0.8
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowOffset
=
CGSize
(
width
:
0
,
height
:
2.0
)
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowRadius
=
2
}
func
setNavigationTitle
(
_
title
:
String
,
_
fontWeight
:
String
?
=
"medium"
)
{
let
uiscreen
:
CGRect
=
UIScreen
.
main
.
bounds
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
f764ddc
...
...
@@ -291,6 +291,8 @@ import SwiftEventBus
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
addNavShadow
()
let
userTag
=
swiftApi
()
.
getUserTag
()
if
(
questionnaireButton
.
currentTitle
!=
userTag
)
{
...
...
@@ -327,6 +329,15 @@ import SwiftEventBus
self
.
coupons
=
swiftApi
()
.
getCouponList
()
self
.
tableView
.
reloadData
()
self
.
startTimer
()
}
public
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
super
.
viewWillDisappear
(
animated
)
self
.
stopTimer
()
self
.
navigationController
?
.
navigationBar
.
layer
.
shadowOpacity
=
0.0
}
public
override
func
viewDidLayoutSubviews
()
{
...
...
Please
register
or
login
to post a comment