Commit 73c6822c by Dmitriy Stepanets

Finished all Medium UI changes

parent a20a4e11
No preview for this file type
......@@ -12,7 +12,7 @@
<key>OneWeatherNotificationServiceExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>49</integer>
<integer>54</integer>
</dict>
<key>PG (Playground) 1.xcscheme</key>
<dict>
......
{
"images" : [
{
"filename" : "location_disabled_arrow.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
......@@ -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)
}
}
......
......@@ -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