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
Dimitris Togias
2022-09-14 07:30:59 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20cf0582a509aa2da664cc02f29c2046836fedd0
20cf0582
1 parent
fea08b23
optimize csm button
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CSMButton.swift
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.xib
SwiftWarplyFramework/SwiftWarplyFramework/CSMButton.swift
View file @
20cf058
...
...
@@ -9,21 +9,31 @@ import UIKit
@IBDesignable
class
CSMButton
:
UIButton
{
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
configure
()
}
required
init
(
)
{
super
.
init
(
frame
:
.
zero
)
self
.
setup
()
override
init
(
frame
:
CGRect
=
.
zero
)
{
super
.
init
(
frame
:
frame
)
configure
()
}
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
self
.
setup
()
override
func
prepareForInterfaceBuilder
(
)
{
super
.
prepareForInterfaceBuilder
(
)
configure
()
}
}
private
extension
CSMButton
{
func
configure
()
{
setImage
(
UIImage
(
named
:
"directions"
),
for
:
.
normal
)
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
setTitleColor
(
.
white
,
for
:
.
normal
)
backgroundColor
=
UIColor
(
red
:
0.47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
layer
.
cornerRadius
=
12.0
private
func
setup
()
{
self
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
self
.
setTitleColor
(
.
white
,
for
:
.
normal
)
self
.
backgroundColor
=
UIColor
(
red
:
0.47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
self
.
layer
.
cornerRadius
=
12.0
imageEdgeInsets
=
UIEdgeInsets
(
top
:
0.0
,
left
:
0.0
,
bottom
:
0.0
,
right
:
5.0
);
titleEdgeInsets
=
UIEdgeInsets
(
top
:
0.0
,
left
:
5.0
,
bottom
:
0.0
,
right
:
0.0
);
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.xib
View file @
20cf058
...
...
@@ -187,6 +187,11 @@
<point
key=
"canvasLocation"
x=
"137.68115942028987"
y=
"120.53571428571428"
/>
</view>
</objects>
<designables>
<designable
name=
"bw3-J9-wHr"
>
<size
key=
"intrinsicContentSize"
width=
"67"
height=
"31"
/>
</designable>
</designables>
<resources>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
...
...
Please
register
or
login
to post a comment