Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-ios
Commits
fdc5b537
Commit
fdc5b537
authored
Jan 10, 2019
by
Jose Blaya
Browse files
Update quick connect flags alpha value for highlight and normal modes
parent
67cf8926
Changes
1
Hide whitespace changes
Inline
Side-by-side
PIA VPN/Server+UI.swift
View file @
fdc5b537
...
@@ -63,6 +63,19 @@ extension UIButton {
...
@@ -63,6 +63,19 @@ extension UIButton {
af_setImage
(
for
:
.
normal
,
url
:
server
.
flagURL
,
placeholderImage
:
Asset
.
Flags
.
flagUniversal
.
image
)
af_setImage
(
for
:
.
normal
,
url
:
server
.
flagURL
,
placeholderImage
:
Asset
.
Flags
.
flagUniversal
.
image
)
return
return
}
}
self
.
setImage
(
image
.
withRenderingMode
(
.
alwaysOriginal
),
for
:
[])
let
original
=
image
.
withRenderingMode
(
.
alwaysOriginal
)
self
.
setImage
(
original
.
image
(
alpha
:
0.7
),
for
:
.
normal
)
self
.
setImage
(
image
.
withRenderingMode
(
.
alwaysOriginal
),
for
:
.
highlighted
)
}
}
extension
UIImage
{
func
image
(
alpha
:
CGFloat
)
->
UIImage
?
{
UIGraphicsBeginImageContextWithOptions
(
size
,
false
,
scale
)
draw
(
at
:
.
zero
,
blendMode
:
.
normal
,
alpha
:
alpha
)
let
newImage
=
UIGraphicsGetImageFromCurrentImageContext
()
UIGraphicsEndImageContext
()
return
newImage
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment