Customising gesture on react native ios - ios

On android one can add listener to Backhandler to detect hardware back action. So, if i create a screen and modify the content of the screen upon some action, then it is easy to go back to previous content with backhandler listener.
On ios, this is not possible to do with the swipe gesture.
React navigation does provide swipe gesture enable/disable to disable the action all together. But if i want to use the swipe gesture to update the content of the app, is it possible with react native/react navigation?
Or adding new screens with different content is the only and recommended option?
for example signing up on the app.
On android what i do is create a single screen and modify its content with different sub components when user presses the next button and its easier to go back by listening to hardware press back. But on ios one can go back by swiping left to right. But using react navigation it goes back to previous screen and i find no way to listen to the gesture and go back to previous sub component instead of previous screen.

React Native Swipe Gestures use this library.
I hope it help you.

Related

how to detect focus change unsuccessful in Jetpack Compose?

I'm building an app for Android TV.
What I want is a way to detect focus change unsuccessful on DPad press UP.
The use case is for any page, when user focus on the top-most item and pressing UP. If the focus is not changed after key press, I will open a top navigation menu overlay.
This is very easy to do in traditional view with FocusFinder and override focusSearch.

Is there a way with Xamarin.Forms to detect the software keyboard in my iOS app?

I have a Xamarin.Forms application with a login screen. I have added code to move the controls out of the way, when one of the Entry fields gets focus. I move the views back down in the Unfocus event handlers. In the simulator I can prevent the software keyboard from popping up. Unfortunately my event handlers still move the view up and down even without the keyboard.
Is there a way to detect the keyboard's appearance in Xamarin.Forms, while in the event handlers on the ContentPage?
I don't think there is support for this out of the box and thus I'd go with DependencyService and implement it by myself.
You could use ContentPage.LayoutChanged event.
It works because the keyboard doesn't display over the content page as one would guess, but under it, in the same layer, so it push the page up.

Vertical Swipe / drag screens IOS / Phonegap

Is it possible to create a vertical swiped screen change in Phonegap - (as in the Facebook app where you can swipe left to view notifications).
I would like to contain 5 pages within the main app - but also be able to swipe left to view a separate page that contains a list of notifications / calendar items
Just wanted toi be sure this was possible before heading down that route..
Cheers
Paul
So you essentially want scrolling but by page? You could use the jQuery Mobile scrollview to get the functionality http://jquerymobile.com/demos/1.0a4.1/experiments/scrollview/scrollview-direction.html

How do I trap focus within a modal popup on iOS using the UIAccessibility protocol?

I am launching a custom popup when the user clicks a button on iOS. How do I make sure that the focus stays within the custom popup (for accessibility reasons) when using voiceover on the iPhone? Currently the focus lands on the elements in the parent container as I swipe right.
If you're targetting for iOS >= 5.0 then there is a property called accessibilityViewIsModal. Using this definitely solve your problem.
If you're targetting for iOS < 5.0 then there is no a straight way for this. You need to customize your view controller's view and reorder the "_accessibleElements" as shown here. See the section Make the Contents of Custom Container Views Accessible.

Cordova app in ios13 device behaves weird with click or swipe actions

I have a cordova app. I have written some custom code in file for swipe actions using touch events, mouse events which will identify the touchmove and swipe. I have a hamburger menu at the top left corner of my app. On clicking this will open a side panel with some animation. on opening the app in latest ios 13, first time click anywhere on the screen is having MouseEvent with x,y,screenX,screenY,pathX,pathY values as 0. this triggers the hamburger menu which is at the top left corner of app and opens the side panel.
Why is the first time click event on screen returns x,y values as 0?
This issue doesn't occur in Android device or iOS <= 12.0 version. Only observed in iOS 13.
On removing my code specific to touch, swipe events. Then this issue is not replicable.
I have another observation. As ios13 supports the pointer events, I have just tried to add code related to pointerEvent
document.addEventListener('pointerdown', function() {
console.log('pointerdown event');
})
This worked for me without removing any code related swipe.
Why there is such difference in the behaviour with the code.
Thanks in advance.
Thank you for your description, we also effected by this issue. Sometimes we experience "ghost" clicks on previous clicked place in our cordova app.
Only happens with iOS13, with both UIWebView and WKWebView.
Seems pointerdown eventlistener is a workaround for this.

Resources