-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow text to wrap up to the next line #36
Comments
@pavankataria did you get a chance to take a look at this? |
Hi @hamzabinamin, yes, this is again related to autolayout and it's not something I've tried to resolve just yet since it's quite complicated having had to create auto calculating cell heights in collection views. In the past I resorted to using what I believe is called a self sizing class but it got ugly in terms of coding and doesn't fair well when there's varying types of cells. I have a hard time figuring out how I'm going to resolve this as this requires the autolayout engine to calculate what the height of the cell will need to be and I'm not sure how to achieve this the correct way. I'd be very interested to have someone explore this issue further and finding out potential ways to resolve automatic height calculation with autolayout. |
@pavankataria Its been a while, hope you're doing okay! Has there been any update regarding this feature? |
Hi @hamzabinamin I'm afraid until an elegant solution hasn't been found I can't implement it. I don't want to explore hacky options as there needs to be a long term solution. I'll need some help in this regard but waiting for the right individual to come along who has experience in creating custom UICollectionView layouts which works well with Autolayout. It's actually harder than it seems. |
@pavankataria Before populating the cells, can't we calculate the max number of lines a value can utilize and update the table view row height for all cells? |
It's hacky and only sort of works for this scenario, it's not a scalable solution. Imagine cells that can have any kind of view which doesn't depend on textfields. For example a button, or an image etc, they should also self size. I'm still working on a solution. It may take a while but I'm working on a viable solution. |
@pavankataria Were you able to figure out something? |
Would be really helpful to wrap longer text on to the next line instead of making the font smaller.
The text was updated successfully, but these errors were encountered: