How to tap a view that's underneath another view with voiceover - ios

I have a UICollectionView with a contentInset at the top.
In the contentInset area, is the Top View. The top view is physically behind the UICV, with hit testing that passes the touches through to the TopView. ie: Touches in the TopView area pass through the UICV and are recognized by the TopView.
However the when tapping in the TopView with the accessibility inspector (or in VoiceOver mode on device), it selects the UICollectionView
Is there a way to make VoiceOver select the TopView in my example?

Related

iOS How to put scrollView inside scrollView but not allow the internal scrollView to scroll the external?

In my app I have a modal View Controller that gets dismissed by dragging the screen down, but in the center of that screen I have UITextView. The problem is that when I scroll to the top of the textView and drag its content down the View Controller gets dismissed. How can I avoid that? I would like the external scrollView to scroll independtly of the textView.
I used title like that because I suspect it's the same problem, but please correct me if I'm wrong

How to scroll within a ScrollView while keyboard is present?

I have a ScrollView and two buttons, one is at the top of the view and the second one is set lower than the height of the keyboard. By changing the inset, I now have the ScrollView move up once the second button is pressed and the keyboard is shown. However, after I press the second button and the keyboard moves the ScrollView up, I want to scroll the view up with a touch to be able to see the first button (without closing the keyboard). But whenever I try to pull it up the keyboard disappears. Any thoughts?

UILongPress Drag into a UIView within a ScrollView

I have a scrollView called sidebar. When I drag my finger on the screen close to the edge of my phone the sidebar pops op. Within the sidebar are UIViews that are subviews of sidebar. Additionally, each view is associated with a viewController. So each view is a subview and the corresponding controller is a childViewController of the subview. How do I recognize when my UILongPress has entered one of the views in my scrollView

Hide Bottom Bar When Pushed through Autolayout

I have a UITabBarController with one UINavigationController holding a UIViewController as root view controller.
when tapping one of the button in the UIViewController, I push a regular chat window UIViewController (with TableView + Input View) end hiding the bottom tab bar. (using the "Hide bottom bar when pushed" flag)
In storyboard I added a regular UIView subclass to VC that look like a bottom bar, and I use Auto Layout to pin it to the bottom of the VC view.
The problem
when I push VC it takes a second for this view to pin to the bottom, it looks like auto layout pin it to the bottom as if the tab bar is not hidden and after a sec it recognise that the tab bar is hidden and moves it to the real bottom of the view.
For clear info check this screen shot
Now I will let you the know the constraints of the table view..
Now I am showing the constraints of the InputView
I am also adding my View hierarchy...
I had a similar issue in my project. I solved it by selecting the view I wanted anchored to the bottom (in your case, the input view), held Command, and selected its superview (both views should be highlighted now).
Then I selected the align button at the bottom of IB:
And added a Bottom Edges constraint.
What I had done initially is used the pin menu to pin the view to its superview, but it appears that will pin it to the bottom layout by default, which causes that weird movement during the transition.
EDIT:
After seeing the latest screenshot, the problem could lie in one of the superviews. I'm assuming that chatWindow is a UIView, and your Scroll View is horizontal only. Here's what your should check:
chatWindow is pinned to the scrollView's bottom similar to what I've outlined above.
scrollView is pinned to its superview as I've outlined above.
Moving the inputView outside of the scrollView to the root superview. Then one by one move it down the hierarchy towards its current location.

Present UIPopoverController from a moving rect

Just got this weird problem, where I have a scroll view and buttons in the scroll view. I want to display a UIPopover from the button when touched, with UITextFields inside the UIPopover. The problem comes when the Keyboard appears. In certain cases, when the UIButton is so high in the view that the popover can only be displayed under it with the UIPopoverArrowDirectionUp, and when keyboard pops in, this popover cannot move any more up and therefore magically disappears to the top left corner (probably some Apple thing).
My solution is to check the frame of the UIPopover and to check that there is enough space for the keyboard, and if not, scroll the UIScrollView up with the buttons as well in order to be able to push the UIPopover up and so make sure that both the Keyboard and the popover fit.
So the question is: Is it possible to move the popover as the button moves?
Thanks

Resources