How to handle textView, which can be expandable according to the text inside UITableViewCell - uitableview

This is the textView, I want it to be expandable according the text which is inside UITableViewCell.
I have tried to give tableView height, but I am unable to expand UITextView.

Related

Accessibility Larger Text affecting UITableViewCell padding when using Custom cell

I am using a Custom UITableViewCell that I have laid out in my Storyboard. I am using a custom iOS font and am not using dynamic text for this UITableView.
However, when I make the text larger using iOS accessibility it does affect my UITableViewCell, likely the padding from the bottom of the contentView as it seems to push all of the labels and views up.
Is there a way to prevent dynamic text from affecting my UITableViewCell layout?

Contained UITableView's Height always 44.0

I am trying to create a button like UIControl that looks like the standard UITableViewCell and support the CellStyles of Value1, Default and Subtitle.
I did try simply creating a UITableViewCell and adding it as a SubView of my UIControl but unsurprisingly the cells don't behave as expected when not in a UITableView.
So I now have a table in my UIControl that has a custom Table DataSource that is hardcoded to only one row.
When I create the cell I populate the text values of the TextLabel and DetailLabel.
This works fine in most cases but when my UIControl is arranged in a UIStackView it is refusing to size the table/cell's height any greater that 44.0.
I am using the CellStyle SubTitle and setting the Labels to be Multilines. They do wrap but appear outside of the Cell which appears fixed to 44.0.
I have set EstimatedHeight on Table and AutomaticDimension
Can anyone offer any suggestions as to why this might be.
Sent from my iPhone

The separator of the last tableViewCell will not be displayed when the UITableView is added to the footerView

The separator of the last tableViewCell will not be displayed when the UITableView is added to the footerView.How can I make it be displayed?
enter image description here
I believe you have no other choice than making a custom UICollectionViewCell and manually add the separator inside as an UIView.
This is rather straightforward if you're using a storyboard as you can directly design your prototype cell inside.

Add button as last UICollectionViewCell if all cells do not fit

My UICollection view should have no more than two rows. If all cells do not fit, it should add "Show More" button as last cell. Cells have dynamic width and UICollectionView is non scrollable.
What are my options?
EDIT
I guess I should check if all cell fits into the screen, maybe using collectionView.visibleCells. If they do not fit, I should probably insert my "Show More" cell. Does this sound reasonable? Any other ideas?
Oh, and all cells have dynamic width.

How to create expandable table view in ios?

On click of table cell it will dynamically increase the label height and if user click on another cell previsoly opened cell will collapse and expand selected cell.I was try hard for this bt label text is not working well.I want increase the height of cell.exa- click on question cell it will expand the answer
Connect UITableViewCell to the code behind, have a state for that cell and on didSelectRowAtIndexPath change cell height to whatever value you want. Regarding of the state of the cell ( you can do this by checking its height as well ) shrink or expand the cell.
You can do this by adding another cell below "question" cell and make it visible or hidden on click as well.

Resources