You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I added the follow code in a UITableViewCell class to show date picker upon pressing a button in the cell. However, the date picker doesn't get dismissed when I press done. Instead, it executes the code below cancel and then return in the done block and keeps showing the date picker. Appreciate your help. Thank you!
let datePicker = ActionSheetDatePicker(title: "Date", datePickerMode: UIDatePickerMode.date, selectedDate: Date(), doneBlock: {
picker, value, index in
picker?.toolbarButtonsColor = UIColor.blue
if let dateSelected = value as? Date {
self.dateButton.setTitle(DateFormat.dateToMonthLettersDayYearString(date: dateSelected), for:.normal)
self.dateButtonTapped(dateSelected)
}
return
//self.superview?.superview
}, cancel: { ActionStringCancelBlock in return }, origin: self.superview?.superview)
datePicker?.toolbarButtonsColor = UIColor.white
datePicker?.toolbarBackgroundColor = UIColor.lightGray
datePicker?.show()
}```
The text was updated successfully, but these errors were encountered:
Hi, I added the follow code in a UITableViewCell class to show date picker upon pressing a button in the cell. However, the date picker doesn't get dismissed when I press done. Instead, it executes the code below cancel and then
return
in the done block and keeps showing the date picker. Appreciate your help. Thank you!The text was updated successfully, but these errors were encountered: