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-10 17:51:55 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
789f0c7b2f65d59a15db4420ef9b8433a332e86b
789f0c7b
1 parent
36ea1332
Remove navigationBar bottom border
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
SwiftWarplyFramework/SwiftWarplyFramework/ViewControllerExtensions.swift
View file @
789f0c7
...
...
@@ -77,6 +77,10 @@ extension UIViewController {
navigationController
?
.
navigationBar
.
tintColor
=
UIColor
.
white
// navigationController?.navigationBar.isTranslucent = false
}
// Remove navigationBar bottom border
self
.
navigationController
?
.
navigationBar
.
hideBottomHairline
()
}
...
...
@@ -379,3 +383,41 @@ extension UITextField {
self
.
resignFirstResponder
()
}
}
extension
UINavigationBar
{
func
hideBottomHairline
()
{
self
.
hairlineImageView
?
.
isHidden
=
true
}
func
showBottomHairline
()
{
self
.
hairlineImageView
?
.
isHidden
=
false
}
}
extension
UIToolbar
{
func
hideBottomHairline
()
{
self
.
hairlineImageView
?
.
isHidden
=
true
}
func
showBottomHairline
()
{
self
.
hairlineImageView
?
.
isHidden
=
false
}
}
extension
UIView
{
fileprivate
var
hairlineImageView
:
UIImageView
?
{
return
hairlineImageView
(
in
:
self
)
}
fileprivate
func
hairlineImageView
(
in
view
:
UIView
)
->
UIImageView
?
{
if
let
imageView
=
view
as?
UIImageView
,
imageView
.
bounds
.
height
<=
1.0
{
return
imageView
}
for
subview
in
view
.
subviews
{
if
let
imageView
=
self
.
hairlineImageView
(
in
:
subview
)
{
return
imageView
}
}
return
nil
}
}
...
...
Please
register
or
login
to post a comment