[TIMOB-18183] iOS: Add property to disable "swipe to go back" gesture on navigation controller windows.
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-28T22:20:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | TCSupportTriage, ios, navigationWindow, tabgroup, window |
Reporter | Ed |
Assignee | Hans Knöchel |
Created | 2014-08-16T00:40:48.000+0000 |
Updated | 2017-03-22T22:38:37.000+0000 |
Description
With iOS 7, Apple introduced a new navigation gesture where you can swipe to the right from the left edge of the device to close a sub window within a navigation controller (NavigationWindow, TabGroup). This feature is enabled by default.
Currently, there is no way to disable this on Titanium except for a [workaround of using a custom leftNavButton](https://developer.appcelerator.com/question/158264/how-to-disable-back-swipe-gesture-on-ios-7). While this works, it is not ideal for all situations, and a property to toggle this feature would be better.
There's a solution posted on stackoverflow that could potentially be used to expose a new property on the Ti Window control:
[http://stackoverflow.com/questions/17209468/how-to-disable-back-swipe-gesture-in-uinavigationcontroller-on-ios-7]
In our particular case, we need to disable this gesture on some windows that have ScrollableViews within, as it can interfere with swiping for those views.
+1
Interestingly, this behaviour has just broken when using Appcelerator Studio. See this post in Q&A : [Swipe right from the edge to go back to the previous window doesn't work anymore in iOS (Using SDK 3.5.1.GA and 4.0.0.GA)](https://community.appcelerator.com/topic/581/swipe-right-from-the-edge-to-go-back-to-the-previous-window-doesn-t-work-anymore-in-ios-using-sdk-3-5-1-ga-and-4-0-0-ga/3) Test code works on all 3+ SDKs using Titanium Studio. Don't does not work when using Appc. Studio.
Is there any news about this? It would be nice to have ability to disable swipe-to-back gesture for specific window. Thank you
Using a custom backButton on the window will disable it.
Yes, I know, but it will be good to have this funcionality, if you want to use system back button.
We introduce the new property
swipeToClose
in theTi.UI.Window
API to enable and disable the swipe-to-close gesture inside aTi.UI.iOS.NavigationWindow
andTi.UI.Tab
. This property istrue
by default. PR: https://github.com/appcelerator/titanium_mobile/pull/7368Merged:
Closing ticket as fixed.