Xcode + remove all breakpoints

Well there’s a 3 step way: Press CMD(⌘)+7 to show all breakpoints. In Xcode4 press CMD(⌘)+6, in Xcode3 press CMD(⌘)+ALT+B. Select all breakpoints with CMD(⌘)+A and delete them, like deleting text, with backspace. There’s no step 3 🙂

Limiting UIDatePicker dates from a particular time. Such as Input DOB to a restricted age limit

You can use dateByAddingUnit and subtract 16 years from current date to set the maximum date for your datePicker as follow: datePicker.maximumDate = NSCalendar.currentCalendar().dateByAddingUnit(.Year, value: -16, toDate: NSDate(), options: []) Xcode 10.2.1 • Swift 5 datePicker.maximumDate = Calendar.current.date(byAdding: .year, value: -16, to: Date())