In my code, I have a UITextField that, when the user logs in, opens the UIDatePicker so that the user can easily and efficiently scroll them to the date of birth. Obviously, we do not want the UIDatePicker to scroll until 2015 and end as it is at present. Since this is a Date of Entry input field, I will also need to limit the entries to 16 years + How can I do it?
class SignUpViewController: UIViewController, UITextFieldDelegate { var datePicker:UIDatePicker! @IBOutlet weak var dateTextField: UITextField! override func viewDidLoad() { super.viewDidLoad()
xcode swift nsdate uidatepicker
Martin q
source share