Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26881] iOS SplitWindow swipeToClose problem

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2019-03-26T17:11:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsiOS
ReporterMartin N
AssigneeAlan Hutton
Created2019-03-06T10:22:39.000+0000
Updated2019-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

FileDateSize
Simulator Screen Shot - iPad Air - 2019-03-06 at 11.17.45.png2019-03-06T10:18:22.000+000081695
Simulator Screen Shot - iPad Air - 2019-03-06 at 11.17.51.png2019-03-06T10:18:22.000+000085236

Comments

  1. Sharif AbuDarda 2019-03-06

    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.
  2. Vijay Singh 2019-03-11

    [~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.
  3. Alan Hutton 2019-03-26

    'The SplitWindow is a top-level window and cannot be contained within another window or view.'.

JSON Source