I've got a UITableView ( let it be big table view ) with two cells. The second cell has UITableView inside. I want to scroll down first cell, than, when it hides from screen on top, i want to disable scroll on the big table view and enable scrolling on the second cell with table view. And when the second table view scrolls to top - enable scrolling on big table view. Here is the link to video :
Video
I've implemented it, but with lag - when scrolling of big table finishes, the transition to scrolling of second cell's table isn't smooth. Did anyone implement this before ? Or can you suggest any github help?) Thanks
Related
I have a table of 10*10 which i have to adjust in my main tableview which contains other data as well. So i decided to put collection view inside my main table view cell to minimise the scrolling.
Everything has went well except when i try to enter data in the text fields of collectionview. As in this case keyboard appear and collectionview adjust it self by moving upward then when they keyboard disappear it never comes back.
The collection view moves up when i put some data in the textfield and try to horizontally scroll it.
Any help please.
I have a UIScrollView in each UITableViewCell of my table view that lays out UIViews horizontally - kind of like the "Featured" section on Apple's App Store. When I'm setting up the UITableViewCell I call a function within the custom UITableViewCell to layout the scroll view. This loops through data assigned to that tableview cell's index path and then creates the custom views and adds them to the scroll view. However, these get mixed up when scrolling the tableview and when the tableview refreshes.
If I clear the subviews before laying them out, it does work. However, I'd like to keep the scroll position at the same point every time it shows the cells. How is this possible?
I've just added an external array that stores the current offset for each scrollview, and then manually set the offset on each scrollview everytime the tableview gets refreshed.
In this I need scroll complete tableview to upward and tableview should stay upwards until user again scrolls down. It should come back to its original position.
Update
I need to scroll the tableview top and bottom on a image
From Apple documentation it's not advisable to add tableView inside scrollview(Reference).
Now according to design of your screen either you can have one tableView and in header of that tableView you can add all static content.Reference
or if your design must have tableView inside scrollView then this SO question maybe helpful to you.
I'd prefer first choice if possible.
By the way if you can fix the height of tableView then you can implement tableView inside scrollView easily.
I have a UICollectionView with one section, 10 cells and horizontal scrolling using a Flow Layout.
One cell occupies the entire screen, and has a UITextView and two UIButtons.
How can I prevent scrolling if no button in the cell is selected, and if it is selected, how can I scroll to the next cell on a UIBarButton click?
I would also like to preserve selection in order to be able to go back to the previous cell and change the selection if needed.
So this is the situation:
I will have 2 differente UITables in the same controller. So, i want to work with a classic vertical UITable controlled by the user who scrolls up and down as demanded. Meanwhile, in the same view I want to have a second UITable with horizontal layout.
Is it possible to auto scroll the horizontal table at the same time when the user scrolls with his finger the vertical UITable?
UITableView extends UIScrollView. Implement the appropriate scroll view delegate methods to be notified of changes to the content offset of the table view. Based on the updated value of the table you can update the content offset of the other table.