G
G
Grigory Psychologist2018-10-31 13:18:48
Swift
Grigory Psychologist, 2018-10-31 13:18:48

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

1 answer(s)
D
Dima Grib, 2018-10-31
@Grigori_Psiholog

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)

Etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question