We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am using ActionSheetDatePicker to get the time input in two of my text fields. Below is the code for that:
func textFieldDidBeginEditing(textField: UITextField) { self.activeTextField = textField let datePicker = ActionSheetDatePicker(title: "Time:", datePickerMode: UIDatePickerMode.Time, selectedDate: NSDate(), target: self, action: "datePicked:", origin: self) datePicker.minuteInterval = 20 datePicker.showActionSheetPicker() }
However it throws below error when I click on the desired text field:
2016-01-06 10:46:06.512 Smartertime[6019:29888] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid origin provided to ActionSheetPicker ( <Smartertime.CollectionViewController: 0x7f8c5c0a8bf0> )' *** First throw call stack: ( 0 CoreFoundation 0x0000000109004e65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x00000001060cfdeb objc_exception_throw + 48 2 CoreFoundation 0x0000000109004cca +[NSException raise:format:arguments:] + 106 3 Foundation 0x00000001097864de -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 ActionSheetPicker_3_0 0x0000000106892189 -[AbstractActionSheetPicker initWithTarget:successAction:cancelAction:origin:] + 665 5 ActionSheetPicker_3_0 0x000000010689b30a -[ActionSheetDatePicker initWithTitle:datePickerMode:selectedDate:target:action:origin:cancelAction:] + 266 6 ActionSheetPicker_3_0 0x000000010689af15 -[ActionSheetDatePicker initWithTitle:datePickerMode:selectedDate:target:action:origin:] + 261 7 Smartertime 0x00000001045b967a
Thanks in advance for the solution.
The text was updated successfully, but these errors were encountered:
found the solution. Replaced the origin from "origin: self" to "origin: self.UItextfield".
Sorry, something went wrong.
No branches or pull requests
Hi,
I am using ActionSheetDatePicker to get the time input in two of my text fields. Below is the code for that:
However it throws below error when I click on the desired text field:
Thanks in advance for the solution.
The text was updated successfully, but these errors were encountered: