Contents of cell in tableview not displayed as expected - ios

I have a UITableView (Dynamic) which is used as a Settings menu.
These cells can be tapped and an "inline" cell will open with for instance a date picker or a valuePicker. (Cell expand-collapse)
This works all fine as expected.
Now I added a new Menu option that also opens an inline cell beneath it, with 4 UITextField.
The strange thing is now that the inline cell is displayed opened but the content for that cell (the 4 UITextField) are shown a bit earlier.
So, the cell is being expanded, but the content is already shown.
When collapsing the cell the same thing happens. The cell is collapsed but contents is just a bit lazy and just a little late

Related

Incorrectly positioned UITableViewCell when containing UITextField

I've created a simple project. It contains a UITableViewController with self-sizing prototype cells that contain a UITextField and a UILabel for displaying validation message. The controls are grouped in a UIStackView, but that doesn't seem to matter.
The label is only visible if there is a message to display, otherwise it's size collapses to 0. To adjust the size of the cell I simple call the recommended:
tableView.beginUpdates()
tableView.endUpdates()
If I scroll the view with the UITextfield remaining first responder (ie w/o dismissing the keyboard), so that the cell is no longer visible, when scrolling back to the cell, it is misaligned.
I've hosted the sample project at https://github.com/ionel71089/tableViewTextField
Note:
Easiest way to reproduce is on Simulator iPhone 6 9.2, by editing let's say the 50th cell, scrolling to the top and then back to the cell.

Label appears only after adding and removing cell

I have a UITable with custom TableView cells.
The cell's contents are based on the segmented control ("Upcoming/Settled").
I have posted a screenshot with three images.
The first shows the cell as soon as the app is loaded. Next to the flame, it should have a number (100219). However, because the text on the left is very long, for some reason I the number is not drawn.
If I change the segmented control index, and bring some new cells (that have shorter-length text), the number appears.
Now, If I switch back to the cell with the long name I get the expected effect which is the name being shrinked to fit and the number drawn as well.
Any ideas how to get this to work as soon as the app is loaded?
Link to image that shows the issue:
UITableViewCell - Autolayout - Label

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.

reloadSections:withRowAnimation: automatically scrolls UITableView

I am using a UITableview with dynamic height rows, and in content I have "Read more" type button. On tapping the button, I append data in a row and call reloadSections:withRowAnimation: for that section.
Everything works as expected, with just one problem - that the tableview automatically scrolls to some other cell after reloadSections:withRowAnimation:. Can anyone help me to find out why it is happening ?

how to expand and collapse the UItable view cell on button click

Has anyone seen a script like this or would be willing to help out with one?
Collapse/Expand Button
The uitableview cell to be expanded partially open (giving a preview in essence)
After the button is pressed then the cell of table would expand to show the entire contents (with a nice fade effect). If you chose to collapse the cell then it would return to the original offset (preview) height.
Has anyone seen anything like this? I've found a plethora of these scripts that fully expand or collapse, but not like this
Thank you for any help!!
you have to make custom cell class. While creating cell give the height of the cell as maximum you want (i.e when it expands) and when creating the custom cell drag a UIView and put all the contents in this view and hides this view. Then when button is being Tapped just you have to make it unhidden.

Resources