Commit edb1d483 by Demid Merzlyakov

Forecast: hide UV. Better spacing.

parent 5fc20747
......@@ -56,7 +56,7 @@ class ForecastInfoCell: UITableViewCell {
//Conditions
conditionsStackView.removeAll()
let availableConditions:[WeatherConditionType] = [.precipitation, .uvIndex, .wind]
let availableConditions:[WeatherConditionType] = [.precipitation, .wind]
let rowsCount = (CGFloat(WeatherConditionType.allCases.count) / 3).rounded(.up)
var currentRow = -1
var currentConditionsRowStackView = UIStackView()
......@@ -64,11 +64,11 @@ class ForecastInfoCell: UITableViewCell {
for (index, type) in availableConditions.enumerated() {
if currentRow != index / Int(rowsCount) {
currentConditionsRowStackView = UIStackView()
currentConditionsRowStackView.spacing = 20
currentConditionsRowStackView.axis = .horizontal
currentConditionsRowStackView.distribution = .equalSpacing
currentConditionsRowStackView.distribution = .fillEqually
conditionsStackView.addArrangedSubview(currentConditionsRowStackView)
}
let conditionView = ForecastConditionView(type: type)
conditionView.configure(dailyWeather: dailyWeather)
currentConditionsRowStackView.addArrangedSubview(conditionView)
......
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