Commit 743e01b2 by Demid Merzlyakov

UI fixes Epic (IOS-83): fixes for IOS-97, IOS-98, IOS-99 and IOS-100.

parents 1cc18a84 dbf49ea8
No preview for this file type
{
"images" : [
{
"filename" : "location_disabled_arrow.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
......@@ -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: 16)
self.dateLabel.font = AppFont.SFPro.regular(size: 14)
self.maxTempLabel.font = AppFont.SFPro.regular(size: 16)
self.precipImageView.tintColor = UIColor(hex: 0x1f67f3)
......
......@@ -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)
}
}
......
......@@ -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.equalToSuperview().inset(4)
make.left.right.equalToSuperview().inset(4)
make.bottom.equalToSuperview().inset(9)
}
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment