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
743e01b2
Commit
743e01b2
authored
May 26, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Plain Diff
UI fixes Epic (IOS-83): fixes for IOS-97, IOS-98, IOS-99 and IOS-100.
parents
1cc18a84
dbf49ea8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
19 deletions
+28
-19
1Weather-Icons.sketch
+0
-0
1Weather/Resources/Assets.xcassets/location_disabled_arrow.imageset/Contents.json
+16
-0
1Weather/Resources/Assets.xcassets/location_disabled_arrow.imageset/location_disabled_arrow.pdf
+0
-0
1Weather/UI/Helpers/ForecastTimePeriod/Buttons/ForecastDetailPeriodButton.swift
+1
-1
1Weather/UI/View controllers/Radar/Controls/MapLegendSevereView.swift
+4
-4
1Weather/UI/View controllers/Radar/MapTimeControl/MapCurrentTimeView.swift
+1
-14
1Weather/UI/View controllers/Radar/RadarViewController.swift
+6
-0
No files found.
1Weather-Icons.sketch
View file @
743e01b2
No preview for this file type
1Weather/Resources/Assets.xcassets/location_disabled_arrow.imageset/Contents.json
0 → 100644
View file @
743e01b2
{
"images"
:
[
{
"filename"
:
"location_disabled_arrow.pdf"
,
"idiom"
:
"universal"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
},
"properties"
:
{
"preserves-vector-representation"
:
true
,
"template-rendering-intent"
:
"template"
}
}
1Weather/Resources/Assets.xcassets/location_disabled_arrow.imageset/location_disabled_arrow.pdf
0 → 100644
View file @
743e01b2
File added
1Weather/UI/Helpers/ForecastTimePeriod/Buttons/ForecastDetailPeriodButton.swift
View file @
743e01b2
...
...
@@ -79,7 +79,7 @@ class ForecastDetailPeriodButton: UIControl, PeriodButtonProtocol {
else
{
self
.
backgroundColor
=
ThemeManager
.
currentTheme
.
periodButtonBackgroundColor
self
.
layer
.
borderWidth
=
1
/
UIScreen
.
main
.
scale
self
.
dateLabel
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
1
6
)
self
.
dateLabel
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
1
4
)
self
.
maxTempLabel
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
16
)
self
.
precipImageView
.
tintColor
=
UIColor
(
hex
:
0x1f67f3
)
...
...
1Weather/UI/View controllers/Radar/Controls/MapLegendSevereView.swift
View file @
743e01b2
...
...
@@ -98,7 +98,7 @@ private class SevereLegendElement:UIView {
addSubview
(
imageView
)
imageView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalToSuperview
()
.
inset
(
3
)
make
.
top
.
equalToSuperview
()
.
inset
(
10
)
make
.
width
.
equalTo
(
30
)
make
.
height
.
equalTo
(
imageView
.
image
==
nil
?
10
:
15
)
make
.
centerX
.
equalToSuperview
()
...
...
@@ -111,9 +111,9 @@ private class SevereLegendElement:UIView {
addSubview
(
textLabel
)
textLabel
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
4
)
make
.
top
.
equalTo
(
imageView
.
snp
.
bottom
)
.
offset
(
2
)
.
priority
(
999
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
2
)
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
imageView
.
snp
.
bottom
)
.
offset
(
4
)
.
priority
(
999
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
7
)
}
}
...
...
1Weather/UI/View controllers/Radar/MapTimeControl/MapCurrentTimeView.swift
View file @
743e01b2
...
...
@@ -9,7 +9,6 @@ import UIKit
class
MapCurrentTimeView
:
UIView
{
private
let
imageView
=
UIImageView
()
private
let
valueLabel
=
UILabel
()
private
let
timeLabel
=
UILabel
()
private
static
var
timeFormatter
:
DateFormatter
=
{
let
fmt
=
DateFormatter
()
...
...
@@ -27,7 +26,6 @@ class MapCurrentTimeView: UIView {
public
func
configure
(
timeItem
:
MapTimeControlItem
)
{
MapCurrentTimeView
.
timeFormatter
.
timeZone
=
timeItem
.
timeZone
valueLabel
.
text
=
""
timeLabel
.
text
=
MapCurrentTimeView
.
timeFormatter
.
string
(
from
:
timeItem
.
date
)
}
...
...
@@ -54,12 +52,6 @@ private extension MapCurrentTimeView {
}
func
prepareLabels
()
{
valueLabel
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
14
)
valueLabel
.
textColor
=
.
white
valueLabel
.
text
=
"49°"
valueLabel
.
setContentHuggingPriority
(
.
fittingSizeLevel
,
for
:
.
vertical
)
addSubview
(
valueLabel
)
timeLabel
.
textAlignment
=
.
center
timeLabel
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
10
)
timeLabel
.
textColor
=
.
white
...
...
@@ -67,13 +59,8 @@ private extension MapCurrentTimeView {
addSubview
(
timeLabel
)
//Constraints
valueLabel
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalToSuperview
()
.
inset
(
4
)
make
.
centerX
.
equalToSuperview
()
}
timeLabel
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
valueLabel
.
snp
.
bottom
)
make
.
top
.
equalTo
Superview
()
.
inset
(
4
)
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
4
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
9
)
}
...
...
1Weather/UI/View controllers/Radar/RadarViewController.swift
View file @
743e01b2
...
...
@@ -376,6 +376,12 @@ extension RadarViewController: RadarViewModelDelegate {
func
viewModelDidChange
<
P
>
(
model
:
P
)
where
P
:
ViewModelProtocol
{
self
.
centerMap
()
cityButton
.
configure
(
with
:
radarViewModel
.
location
)
if
radarViewModel
.
location
?
.
deviceLocation
==
true
{
self
.
locationButton
.
setImage
(
UIImage
(
named
:
"location_arrow"
),
for
:
.
normal
)
}
else
{
self
.
locationButton
.
setImage
(
UIImage
(
named
:
"location_disabled_arrow"
),
for
:
.
normal
)
}
}
func
viewModel
(
model
:
RadarViewModel
,
didSelectLayer
layer
:
RadarLayer
)
{
...
...
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