Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
b0b13c12
Commit
b0b13c12
authored
May 05, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added scrolling behavior for legend view
parent
f6a6422b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
13 deletions
+21
-13
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
1Weather/Model/RadarLayers/SevereLayerType.swift
+6
-7
1Weather/UI/View controllers/Radar/Controls/MapLegendSevereView.swift
+14
-5
No files found.
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
b0b13c12
...
...
@@ -12,7 +12,7 @@
<
k
e
y
>
OneWeatherNotificationServiceExtension.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
3
7
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
1Weather/Model/RadarLayers/SevereLayerType.swift
View file @
b0b13c12
...
...
@@ -119,13 +119,12 @@ public enum SevereLayerType:String, CaseIterable, RadarLayerType {
UIColor
(
hex
:
0x7F1819
),
UIColor
(
hex
:
0xF0807F
)]
.
map
{
$0
.
cgColor
}
case
.
hurricaneTropicalTracks
:
return
[
UIColor
.
black
,
UIColor
.
black
,
UIColor
.
black
,
UIColor
.
black
,
UIColor
.
black
,
UIColor
.
black
,
UIColor
.
black
]
.
map
{
$0
.
cgColor
}
return
[
UIColor
(
hex
:
0x61bb46
),
UIColor
(
hex
:
0xfdb827
),
UIColor
(
hex
:
0xf5821f
),
UIColor
(
hex
:
0xe03a3e
),
UIColor
(
hex
:
0x963d97
),
UIColor
(
hex
:
0x009ddc
)]
.
map
{
$0
.
cgColor
}
case
.
ice
:
return
[
UIColor
(
hex
:
0x8A008B
),
UIColor
(
hex
:
0x8A008B
),
...
...
1Weather/UI/View controllers/Radar/Controls/MapLegendSevereView.swift
View file @
b0b13c12
...
...
@@ -9,6 +9,7 @@ import UIKit
class
MapLegendSevereView
:
UIView
{
//Private
private
let
scrollView
=
UIScrollView
()
private
let
stackView
=
UIStackView
()
init
()
{
...
...
@@ -37,13 +38,22 @@ class MapLegendSevereView: UIView {
}
private
func
prepare
()
{
scrollView
.
showsVerticalScrollIndicator
=
false
scrollView
.
showsHorizontalScrollIndicator
=
false
scrollView
.
clipsToBounds
=
false
addSubview
(
scrollView
)
scrollView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
edges
.
equalToSuperview
()
}
stackView
.
axis
=
.
horizontal
stackView
.
spacing
=
8
stackView
.
distribution
=
.
equalSpacing
addSubview
(
stackView
)
stackView
.
distribution
=
.
fillEqually
scrollView
.
addSubview
(
stackView
)
stackView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
height
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
.
priority
(
.
low
)
}
}
}
...
...
@@ -78,8 +88,7 @@ private class SevereLegendElement:UIView {
private
func
prepare
()
{
self
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
equalTo
(
50
)
.
priority
(
999
)
make
.
height
.
equalTo
(
40
)
make
.
width
.
equalTo
(
50
)
}
imageView
.
clipsToBounds
=
true
...
...
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