Transfer event between two scroll - ios

I have table view and scroll view. Table view is on scroll view. Now I want to drag scroll view and if scroll view dragged to some point, scroll view should stop drag and table view start to scroll within single drag (touch) event. I tried it with UIPanGestureRecognizer and also tried with implementation of - (void)scrollViewDidScroll:(UIScrollView *)scrollView.
But not getting success.
This is implementation [Please go through image. table view scrolling and depend on that above view moved to top. now i want table view scroll to stop and move table view and topView to top and when topView invisible tableview should scroll withn that single drag event]
Up Scrolling Table View:
Down Scrolling Table View:

Related

Scroll view can't perform delegate but table view can

I have a scroll view to show image and set inside tableview cell. Scroll view can’t perform scroll view delegate but table view can perform the scroll view delegate.
So, how can I perform delegate only scroll view?
When you scroll in scroll view the scroll view delegate will be called but the table view will get scrolled. You can not access only scroll view delegates inside table view.
If you add image to the scroll view, it will not scroll because you are actually scrolling the Cells and not the scroll view itself.
That's why, you need to add the image to a cell, not to the scroll view.
So in your table View delegate method where you are constructing your cells you should add the image view.

UICollectionView inside UIScrollView not scrolling

I have a vertically-scrolling scroll view that has a single subview. This subview has a couple of collection views. I want them to scroll horizontally. It doesn't work because they are inside the scroll view.
The problem is that the pan/scrolling gesture is working just for the scroll view and it doesn't propagate to the collection views. I just see the scroll view scrolling.
There is the same problem with tapping on a collection cell. This event just doesn't happen.
I already tried adding the gestures manually but I am not able to scroll the collection views.
How can I propagate all the gestures ?
Thank you !
]1

Page view constraints bug

I have set up a page view controller in swift with a scroll view and a view inside the scroll view. I made constraints for both of them but when I run the project on swiping left or right between the pages the view in the scroll view first comes a little bit smaller and then when the swipe is completed it expands.
Here is the problem:

UIScrollView that has UITableViews as subviews won't scroll horizontally

I have a view controller that owns a UISegmentedControl, a UIScrollView, and several UITableViews. The segmented control and the scroll view are subviews of the view controller's root view. The table views are subviews of the scroll view. The scroll view takes up all the space below the segmented control and each table view is as large as the scroll view. Table views are placed horizontally aligned inside the scroll view.
The view controller should support scrolling to one of its table views either by selection in the segmented control (that works) or by swipe gesture (that does not work yet). I have checked that the scroll view's contentSize is appropriate and I have also tried turning the table view cells' userInteractionEnabled off. I have also checked that the table views do not exceed the size of the scroll view as discussed here. (Each table view is as large as the scroll view, albeit at a horizontal offset.) Still the scroll view can|t be swiped horizontally as I would expect.
Could it be that the table views themselves consume all (including horizontal) swipe gestures as part of their support for vertical scrolling? How can I ensure that the scroll view further up in the scroll hierarchy can (also) react to such swipe gestures?

How to fix the position of a tableview cell on the top of the view

I have a table view containing a segmentController as one of its cells. What I want to do is when I scroll up the table view, this segmentController is fixed on the top of the view as the content goes up, rather than disappear.

Resources