-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add image to table cell #20
Conversation
This reverts commit b26b7f9.
@rxcai Thanks! I'll review it shortly. |
@@ -308,7 +308,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
cell.accessoryType = UITableViewCellAccessoryCheckmark; | |||
} | |||
} | |||
if ([self.dataSource respondsToSelector:@selector(czpickerView:attributedTitleForRow:)]) { | |||
if([self.dataSource respondsToSelector:@selector(czpickerView:titleForRow:)] && [self.dataSource respondsToSelector:@selector(czpickerView:titleForRow:)]){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two checks for czpickerView:titleForRow:
? you may want to check czpickerView:imageForRow:
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I think that normally there are two situations:
- only text
- image + text
it rarely happens only image for each table cell.
In order to make sure that text and image are all set, I choose to make two checks.
What's your opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, therefore you should check dataSource
responds to czpickerView:titleForRow:
AND czpickerView:imageForRow:
right?
You are actually checking czpickerView:titleForRow:
twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps people should be able to use image + attributedTitle right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry... it's a type error... I'll correct it and re-push to you, sorry for it.
image + attributedTitle Yes, I'll add it and re-push to you ;)
@rxcai the code looks good, before merging your PR, can you please do 3 more things?
Thanks, we need these things to sort out so that people will know how to use the new feature. |
I'll do it this weekend ;) |
2. Bump version number to 0.3.7 3. Update README.md and CHANGELOG.md + make a new .gif to show demo with pictures
Normally I've finished what you required and added a new demon gif with items' pictures ;) |
Hi @rxcai, your PR has been merged! Thanks for your patch, you're the first contributor of this project :D. Also, if you would like to continuing working on CZPicker, issue 18 would be a good one. |
;) I'll keep working on it |
Hey Zeyu,
I am using CZPicker in my application, appreciate it since you make it simple to use. Because I need to present an image for each cell as well, I've added this into your classes ;)