Accessibility issue in UIScrollView - ios

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

Related

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

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?

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.

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

How bad is it to embed UIWebView in UIScrollView?

So Apple is saying that UIWebView and UITableView objects shouldn't be embedded in UIScrollView objects. https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/index.html
You should not embed UIWebView or UITableView objects in UIScrollView objects. If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled.
Does that mean we should never have web or table views inside scroll views? I'm implementing an app that have several web views and table views that scroll with the rest of the content of the view, so scrolling in the web and table views is disabled.
To never place web or table views inside scroll views would mean big design changes. Is Apple saying that we should never keep web and table views inside scroll views, meaning we can never have them scroll with the rest of the view's content?
Or will it work OK as long as scrolling is disabled for the web and table view embedded in the scroll view? If not - are there any better alternatives other than redesigning the app?
I have used a UITableView inside a UIScrollView in a production app.
Example:
List of POI's in a UITableView and MKMapView next to each other inside a UIScrollView with paging enabled.
The problem was indeed that the scrolling of the UIScrollView did not actually work. Especially on the MKMapView, as this scrolls in all directions. The workaround was to create a custom UIView with two UIButton's which act as a custom UISegmentedControl. These will actually scroll the UIScrollView to the selected page.
Some of the things Apple puts in their documentation is probably there to be able to comment on bug reports, or to say: See, we told you so.
UIWebView ans UITableView inherit from a UIScrollView, so they will scroll if the content exceed the screen size.
If you use it in a UIScrollView its a UIScrollView in an other. That's why it can cause problems.
And if you want to use scrolling view in another, you should change the design of your app.

How to enable UIPageViewController's page scroll while scrolling its content vertically (a collection view)?

I'm making an app like SmartNews, with a UIPageViewController that contains many UICollectionView pages.
The structure:
A UIPageViewController, with pages scrolling horizontally. (Transition style is UIPageViewControllerTransitionStyleScroll)
Each page in it contains a UICollectionView scrolling a set of cells vertically.
Both view have the same size and touch areas on the screen are common.
The problem:
While the collection view is scrolling down by itself (i.e. the user is no longer touching the screen but the collection view is still scrolling by decelerating), the user can't swipe pages.
It seems if another pan gesture occurs at this moment, it is tracked by the collection view to stop the current scroll and it doesn't allow the user to swipe the page view controller.
Is there a way to allow the user to scroll pages (horizontally), while the collection view is still scrolling (vertically)?
(Instagram's search view realizes this feature.)
Thanks!
Found what I wanted to do here:
Cross Directional UIScrollViews - Can I Modify the Scrolling Behaviour?
I guess it's unsafe to do the same with UIPageController as the scroll view inside it is undocumented.
I will try to replace the UIPageController with a UISCrollView with paging enabled.

Resources