Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19232] iOS: headerView/footerView in ListView disappears on half swipe back

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-17T22:47:07.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.1, Release 5.0.0
ComponentsiOS
Labelsn/a
ReporterEduardo Gomez
AssigneeHans Knöchel
Created2015-07-20T21:26:29.000+0000
Updated2015-08-17T22:47:12.000+0000

Description

Issue Description

A listView which contains a headerView or footerView and a ListSection disappear at the time to swipe window back.

Steps to Reproduce

1. Navigate from Page1 to page Page2 2. Swipe from left end of screen to half of screen. And cancel the swipe by moving back to left end of the screen. 3. All the contents of the headerView/footerView disappear. Screenshot attached.

Sample Code

var createCustomView = function(title) {
    var view = Ti.UI.createView({
        backgroundColor: '#222',
        height: 40
    });
    var text = Ti.UI.createLabel({
        text: title,
        left: 20,
        color: '#fff'
    });
    view.add(text);
    return view;
};
 
var rows = [];
for (var i = 0; i < 5; i++) {
    rows.push({ properties: { title: '\u263B Row '+ i }});
}
 
var win = Ti.UI.createWindow({
    title: 'Window',
    backgroundColor: 'red',
    navBarHidden: false
});

var button = Ti.UI.createButton({
   title: 'Open Blue Window' 
});
 
button.addEventListener('click', function(){
    var win3 = Ti.UI.createWindow({
        title:"Blue Window",
        backgroundColor:"blue"
    });
    var ls = Ti.UI.createListSection({
        items: rows
    });
    var lv = Ti.UI.createListView({
        height: Ti.UI.FILL, width:Ti.UI.FILL,
        headerView: createCustomView('Header View'),
        footerView: createCustomView('Footer View'),
        contentInsets: { top: 64, bottom: 60 },
        sections: [ls]
    });
    win3.add(lv);
    nav.openWindow(win3);
});

win.add(button);
var nav = Ti.UI.iOS.createNavigationWindow({ window: win });
nav.open();

Attachments

FileDateSize
iPad_SwipeHeaderView.png2015-07-20T21:18:56.000+0000165377

Comments

  1. Chee Kiat Ng 2015-08-17

    PRs merged.
  2. Wilson Luu 2015-08-17

    Closing ticket as fixed. Verified headerView and footerView in ListView does not disappear if you swipe midway. Tested on: Appcelerator Studio, build: 4.1.1.201507141126 Appc CLI NPM: 4.1.0-2 Appc CLI Core: 4.1.3-2 Arrow: 1.2.26 SDK: 4.1.1.v20150816214206 Node: v0.10.38 OS: Yosemite (10.10.4) Xcode: 6.4 Devices: iphone 6 plus (8.3), ipad 3 (8.3)
  3. Wilson Luu 2015-08-17

    Reopening to fix my comment.

JSON Source