[TIMOB-26881] iOS SplitWindow swipeToClose problem
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-03-26T17:11:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | iOS |
Reporter | Martin N |
Assignee | Alan Hutton |
Created | 2019-03-06T10:22:39.000+0000 |
Updated | 2019-03-26T17:11:42.000+0000 |
Description
When using the swipe to close functionality in iOS and releasing your finger an inch away from the edge of the screen, it makes the content of current window disappear. Seems to only be a problem when using the SplitWindow. I can reproduce the issue using the following code:
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win1 = Ti.UI.iOS.createNavigationWindow({
window: win2
});
var button = Ti.UI.createButton({
title: 'Open SplitWindow'
});
var detail = Ti.UI.createWindow({ backgroundColor: 'white',swipeToClose:false });
var label1 = Ti.UI.createLabel({ text: 'Detail View' });
detail.add(label1);
var master = Ti.UI.createWindow({ backgroundColor: 'gray',swipeToClose:false });
var label2 = Ti.UI.createLabel({ text: 'Master View' });
master.add(label2);
var splitWin = Ti.UI.iOS.createSplitWindow({
detailView: detail,
masterView: master
});
button.addEventListener('click', function(){
win1.openWindow(splitWin, {animated:true});
});
win2.add(button);
win1.open();
Attachments
File | Date | Size |
---|---|---|
Simulator Screen Shot - iPad Air - 2019-03-06 at 11.17.45.png | 2019-03-06T10:18:22.000+0000 | 81695 |
Simulator Screen Shot - iPad Air - 2019-03-06 at 11.17.51.png | 2019-03-06T10:18:22.000+0000 | 85236 |
Hello [~mavno], I tested your sample code with SDK 7.5.1.GA. And I was able to reproduce the issue you described. So, click on "Open SplitWindow" in the red window opens the white window with "Detail View" text in the middle. Now, try swiping right but not releasing the touch and not finishing the swipe will cause the "Detail View" text to disappear. This is the issue. Tested with SDK 7.5.1.GA on iOS 12.1 simulator. Moving to engineering. Thanks.
[~mavno] If you see the [doc](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.SplitWindow), it is mentioned that 'The SplitWindow is a top-level window and cannot be contained within another window or view.'. So opening SplitWindow inside navigation window is not correct way.
'The SplitWindow is a top-level window and cannot be contained within another window or view.'.