Answer the question
In order to leave comments, you need to log in
How to refer to UIPickerView row?
I created a UIPickerView in the code, named the lines, I did all this, but it's not clear how to work with these lines, how to access this or that line and put the functionality I need into it?
Answer the question
In order to leave comments, you need to log in
Create a Picker
And then work with it
var oneYearTime = TimeInterval()
oneYearTime = 365 * 24 * 60 * 60
let todeyDate = Date()
let oneYearFromToday = todeyDate.addingTimeInterval(oneYearTime)
// 2
et twoYearFromToday = todeyDate.addingTimeInterval(2 * oneYearTime)
// 3 Задаем пикеру диапазон
picker.minimumDate = oneYearFromToday
picker.maximumDate = twoYearFromToday
// 4
picker.countDownDuration = 2 * 60
// 5 Узнать какую дату выбрал юзер и сохранить ее
picker.addTarget(self, action: #selector(datePickerChenge(paramdatePicker:)), for: .valueChanged)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question