Expanding a UIView in a UITableViewCell as well as the cell itself on click - swift

I have a TableViewCell with three Views. I'm using AutoLayout and UITableViewAutomaticDimension for the rowHeight. What I want to achieve is that when a user clicks on a cell, the blue view as well as the whole TableViewCell gets expanded (animated), like this ...
I couldn't come up with an idea to solve this, does anyone has a hint?

Related

UITableViewCell StackView Hidden Elements

I have a TableViewCell that has 2 StackViews. One of the StackViews has 3 components and one of which is hidden. By pressing on a button, I want the hidden UIImageView to appear. While my code does this, it does not format it correctly as the height of the TableViewCell does not change, as I would like it to. I have tried calls to sizeToFit(), but I am starting to realize that this will not affect the height of a cell. When the cell leaves the view and comes back, it draws correctly. How can I update the height of the cell when the button is pressed?
After writing out this question, I started to realize that the problem was from the cell's height. After doing a little bit more research I found out that this can be achieved with the
tableView.beginUpdates()
tableView.endUpdates()
I had to create a delegate and add a delegate method to reference back to the ViewController.
Hope this helps someone else!

How to show custom options on swipe table cell in a simple way

I am working on a app which includes table cells. I want that when i swipe table cell it shows two options, first about that cell value and another for delete that value. How can i show that in a way that the cell value shows in half of cell and the options show in half of cell.
Thanks in advance.
There are an out of the box solution, called HHPanningTableViewCell. It does exactly what you need!
HHPanningTableViewCell is a UITableViewCell implementing "swipe to reveal" a drawer view. Such a view typically holds action buttons applying to the current row.
This library, SWTableViewCell, should help you:
https://github.com/CEWendel/SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swipeable content view which exposes utility buttons (similar to iOS 7 Mail Application)
You have to create a custom cell and override Apple's behavior which is swipe left to delete and then show your options. You can add gesture recognizer to the cell and on swipe to left animate the cell content view and animate in your option view or however you like it to be. I can write up an example code if you need.

Implementing a dynamic height on UITableView

I have a UITableView embedded in a UIViewController. The TableViewCells are rows for the user to select something, so when they touch it a checkmark appears, heres where my question comes in:
I dont want the UITableView to scroll in its window, I want the TableView to grow with the items it contains. Do I need to put a scroll view on the UIViewController and then the TableView on that? Or will the ViewController scroll if the content is bigger than the View?
Also, Im not even sure where to start with changing the height dynamically of the UITableView, everywhere I look its about changing the cell heighets dynamically.
Please Help! Thank you!
self.tableView.scrollEnabled=false;
stops the scrolling
self.tableView.frame=CGRectMake(0, 0, (float)width, (float)height);
sets the size of your tableview
But I don't understand why you want to stop tableview scrolling and to scroll the whole view....

Bring UIScrollView to foreground

I have a UIScrollView inside a cell but when the cell is selected the view disappears in the background how can I put it back to foreground. Thanks
JVPython
It's possible you aren't properly setting up your UITableViewCell so that selection doesn't cover up the cell contents. Perhaps you are adding the scrollview to the cell directly and not to the contentView of the cell?
The Apple documentation describes the layout of a cell and what happens to those elements when a cell is selected: Table View Programming Guide
Have you tried:
[self.view bringSubviewToFront:myScrollerView];

How do I hide the UITableViewCell border for a custom cell in a group tableview?

What I am trying to do: I want three buttons side-by-side in a tableviewcell just like in Contacts app.
What I've done: I have a custom tableviewcell with three uibuttons in it. I've set the background color of the tableviewcell to be transparent.
What I can't figure out: The tableviewcell border is still there! Everything looks great except for the border floating around the 3 buttons.
Am I doing this completely wrong? Or is there a simple way to remove/hide the border?
Thanks!!!
Don't put these in a cell. Simply create a custom UIView that contains the three buttons, and use that view as your Table's footer:
[myTableView setTableFooterView:customUIViewWithButtons];
Good luck!
What about if I want my transparent cell in the middle?