-
Notifications
You must be signed in to change notification settings - Fork 51
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
Using it in UITableViewCell #23
Comments
Yes, you can use it in any |
Thank you! Will try it! |
No problem, LMK if you have issues! |
Maybe I'm doing something wrong when reusing the cells, but I don't think so. Look at the behavior of the cells. Look at this video -> https://www.dropbox.com/s/uc9jqdpmvofom4v/Untitled.mov?dl=0 Let me know, Thanks
|
I'm reading this on a phone at the moment so not 100% sure, but it looks like your adding 1 instance of a label as a subview to multiple cells. |
Correct, and it won't show that label until I scroll the view. Which is weird. If I do cell.textlabel.text it will show at the beginning with no scrolling needed. |
Yeah the problem has nothing to do with Facade or the layout, it has to do with cell reuse. You cant have the same view as a subview of multiple views. Each cell needs its own instance of that label. |
I understand, what would be the best practice here to use Facade on a UITableViewCell? |
Subclass UITableViewCell, put a label in there, and in that cell's layoutSubviews method is where you would have your Facade code. |
In one of my open source apps, I have a UICollectionViewCell I do this with. You can reference the source here: https://github.com/mamaral/xkcd-Open-Source/blob/master/Source/Views/Comic%20Cell/ComicCell.m |
I will check it out! Thank you man! Sent from my iPhone
|
Hello,
Love your project. Can I use this category in a UITableViewCell?
The text was updated successfully, but these errors were encountered: