How disable/enable scrolling in UITableView during one gesture (iOS - Swift) - ios

I need create similar detail view as in Maps app in iOS. This view is possible to pull out from bottom and contains UITableView. The problem is with enabling/disabling scrolling of table view. I know that table view has attribute isScrollingEnabled, but if I change it, it works only for new gesture. Is there any way, how could I enable or disable scrolling during one gesture?

Related

How to enable UITableView swipe to delete along with horizontal page swiping

In one of my app, I am having multiple table views inside a horizontal scroll view. So, user can horizontally swipe between table views. I am not using UIPageViewController for some reason.
The problem that I am facing is that I have swipe to delete feature on my UITableView but does not work when I have multiple pages in the horizontal scroll view.
Is there an elegant way to provide both the features at the same time?
You can subclass UIScrollView and implement UIGestureRecognizerDelegate. Then return true in gestureRecognizer(_:,shouldRecognizeSimultaneouslyWith) for the appropriate recognizers.

Accessibility issue in UIScrollView

In my app we have taken a scrollview with paging enabled inside that i have added multiple custom views which can have multiple individual elements which are all accessible. Now the issue is when accessibility is on and i try to traverse all the elements via right swipe gesture.
Observation: when it comes to last element of first custom view and i perform right swipe gesture it does not jumps the focus to next custom view elements. Any idea how i can make it happen?
I followed voice over can only see a page of a uicollectionview but here there are using collection view and individual elements inside UICollectionViewCell are not accessible
Using paging with a scrollview, the UIPageControl handles movement between the subviews. You really should just leave this control as the accessibility component for navigation as users are familiar with how it works.
https://developer.apple.com/documentation/uikit/uipagecontrol

Swift; is scrollView with tableView feasible?

I've have been trying for a while now, to implement a specific behavior in my app. On the initial view of my app, there must be a logo(imageView), a label and a textField. It should be possible to scroll down from the initial view, to a tableView. while the user scrolls down, the label in moved up in the window, to form a search field for the tableView. Then the scrollView should lock to the part with the tableView, and it should only be possible to scroll back up, if dragging elsewhere than the tableView.
What is best practice for doing as described?
The image show (only for illustration, i havn't been using story board when trying to implement it) an overview of the problem:
The way I've tried to do this so far, is by embedding the tableView in a scrollView (as seen on image), enabling paging on the scrollView, and than disabling scrolling on the scrollView, when the buttom part has been reached. I've added a gesture reconizer on the part with of the screen with the textField.
These two posts (Scrollview with embedded tableview and Use Pan Recognizer to Control ScrollView) descripe i further detail what i've tried so far.
But the question is more to, is there an alternate solution for making behaviour descriped above?
Maybe interactive animated transitioning between view controllers somehow?
YES there are! Implement a table view with a header view. And remove the scroll view.
self.tableView.tableHeaderView = topView
where topView will be the view wish as the UIImage, the label and textField

UICollectionView inside UITableViewCell scroll behaviour

I'm trying to implement something similar to iTunes Store UI.
As you can see from the picture, there are two directions of scrolling possible. But I would like to prioritise scrolling of UICollectionView which is to the left or right because currently scroll down and scroll left/right are conflicting and causing weird behaviour.
Way to duplicate:
Scroll Down UITableView and then quickly try to swipe right or left on UICollectionView. UITableView will continue to scroll.
How can I do so? Do I need to use GestureRecognizer?
I always avoid collection view as it provides less flexibility to work with auto layout compared to a table view, however not against collection view every time. You should try the adding collection view inside a table view
There is a number of tutorials available for the same. eg (ios 8 Swift - TableView with embedded CollectionView)

Swipe does not work with UITableview's scrollview and Pull to Refresh in iOS

I have created UITableView with Scrollview and given swipe gesture to swipe from left to right and vice-versa between three different views. Both of them don't seem to work with each other. On top of this I have a pull to refresh functionality on the UITableView. I have tried to implement UIGestureRecogniser delegate method but it doesn't seem to work.Any Suggestions?
I have realised that when the bouncing is disabled on the scrollview the swipe functionality works fine, but Pull-to-refresh does not work in this case.

Resources