Commit 25acc9c8 by Demid Merzlyakov

Merge branch 'bugfix/houly_tab_unselected_via_deeplink' into 'release/5.1.1-native-ads-att'

[IOS-120]: Set default selected index from the data source to the weather forecast

See merge request oneweather/1weather-ios-new!2
parents 7ec461dc 6ae85375
...@@ -173,7 +173,7 @@ private extension ForecastViewController { ...@@ -173,7 +173,7 @@ private extension ForecastViewController {
func prepareTimePeriodControl() { func prepareTimePeriodControl() {
let container = UIView() let container = UIView()
container.addSubview(self.timePeriodControl) container.addSubview(self.timePeriodControl)
timePeriodControl.selectedSegmentIndex = 0 timePeriodControl.selectedSegmentIndex = forecastCellFactory.timePeriod.rawValue
timePeriodControl.addTarget(self, action: #selector(handleSegmentDidChange), for: .valueChanged) timePeriodControl.addTarget(self, action: #selector(handleSegmentDidChange), for: .valueChanged)
self.timePeriodControl.snp.makeConstraints { (make) in self.timePeriodControl.snp.makeConstraints { (make) in
......
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