-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
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
Use with UITableViewCells #4
Comments
Can you provide some code examples or more detail stack trace of this exception? |
I could resolve the issue: This problem only happens if you try to cast the origin/UITableviewCell to UIControl like in the IBAction methods of your example project. |
Ok. |
I copied the IBAction from the example project. There you cast the sender to UIControl. This was the problem for me when I called this method in didSelectRowAtIndexPath with the current selected UITableViewCell. |
@martinpfannemueller How can you resolve the issue?Have a example? |
Now I use it like this in didSelectRowAtIndexPath:
The code of elementWasSelected looks like this:
|
Hello, |
@VrasidasP can you provide example, how to reproduce it? Here is an example, how I call Picker: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
UILabel * sender = cell.detailTextLabel;
ActionSheetDatePicker *datePicker = [[ActionSheetDatePicker alloc] initWithTitle:@"Select a time" datePickerMode:UIDatePickerModeTime selectedDate:[NSDate date] target:self action:@selector(timeWasSelected:element:) origin:sender];
datePicker.minuteInterval = 5;
[datePicker showActionSheetPicker];
} |
Indeed you are correct, it is working fine. Sorry for the inconvenience and thank you for the excellent library! :) |
@VrasidasP you're welcome! |
Hey there,
I tried to run this together with a UITableViewCell (didSelectRowAtIndexPath). This is not possible since I get an NSInternalInconsistencyException with the reason "Invalid origin provided to ActionSheetPicker". Is there a way to run this project with a UITableViewCell?
The text was updated successfully, but these errors were encountered: