Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15396] iOS7: Scrolling the TableView up and releasing it causes the content on the first row to move to the right

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-24T16:41:55.000+0000
Affected Version/sRelease 3.1.2, Release 3.1.3
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsiOS
Labelsios7, module_tableview, qe-testadded, supportTeam
ReporterRupesh Sharma
AssigneeVishal Duggal
Created2013-10-04T07:30:45.000+0000
Updated2014-02-12T06:52:55.000+0000

Description

Description

When I open the app and scroll the table view up and release it, the content on the first row moves to right. Please see the attached screenshot depicting the issue. Also included three images which need to be attached in project resource folder before running it. Note : Also if i don't include these three images in my project and run it without any images it runs fine on iOS7 also. This issue is with iOS 7 only and it work fine on iOS 6.

Test Case

var appWindow = Ti.UI.createWindow({
        height:Ti.UI.FILL,
        width:Ti.UI.FILL,
        backgroundColor:'#FFFFFF'
    });

var tableView = Ti.UI.createTableView({

    separatorStyle:'NONE',
    backgroundColor:'#FFFFFF'
});
var data =  [{title:"App 1",count:"3"},
                                {title:"App 2",count:"6"},
                                {title:"App 3",count:"3"},
                                {title:"App 4",count:"6"},
                                {title:"App 5",count:"4"},
                                {title:"App 6",count:"2"}];
var customRow =[];
for(var i=0;i<data.length;i++)
    {
        customRow[i] = CustomRow_withCount(data[i]);
        tableView.appendRow(customRow[i]);
}
function CustomRow_withCount(_obj){

    var countView=Ti.UI.createLabel({
        right:5,
        height:26,
        width:36,
        backgroundImage:'countImage.png',
        color:'#000000',
        font:{fontSize:12,fontWeight:'bold',fontFamily:'arial'},
        textAlign:'center',
        text:_obj.count,
    });

    var text_label= Ti.UI.createLabel({
        left:20,
        height:26,
        width:200,
        color:'black',
        font:{fontSize:16,fontWeight:'bold',fontFamily:'arial'},
        text:_obj.title,
    });

    var row = Ti.UI.createTableViewRow({
        rightImage:'arrow.png',
        backgroundImage:'row_backgrnd.png',
        height:40
    });


        row.add(text_label);
        row.add(countView);

    return row;
}
appWindow.add(tableView);



var navGroup = Ti.UI.iPhone.createNavigationGroup({
    window:appWindow,
    backgroundColor:'transparent',
});
var main = Ti.UI.createWindow();
main.fullscreen= true;
main.add(navGroup);
main.open();

Attachments

FileDateSize
arrow.png2013-10-04T07:30:45.000+0000225
countImage.png2013-10-04T07:30:45.000+0000597
row_backgrnd.png2013-10-04T07:30:45.000+0000455
screenShot.PNG2013-10-04T07:30:45.000+000030371

Comments

  1. kosso 2013-10-07

    Just tested this and can confirm the bug. As a note: I also tried using hasChild:true instead of the custom rightImage and get the same result with the top row moved to the right after scrolling off and on the screen. Also tried setting a unique className to each row, to no avail. When no rightImage or hasChild is set, the table appears correctly. The bug is also present when only the hasChild is true, and also omitting the countView all together. There's definitely something very wrong here. I would mark this issue as critical.
  2. kosso 2013-10-07

    Just a note to Rupesh: createNavigationGroup is being deprecated. A navigationWindow should now be used. See : http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.NavigationWindow Though, this did not affect the outcome of the issue at hand.
  3. Ingo Muschenetz 2013-10-07

    [~kosso] Noted. We are planning on fixing it for the next release.
  4. Vishal Duggal 2013-10-23

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4834
  5. Pragya Rastogi 2013-11-13

    Tested and verified fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201311122045 SDK: 3.2.0.v20131112180422 acs:1.0.7 alloy:1.3.0 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iOS7(v7.0.3)-iPodTouch1
  6. Pragya Rastogi 2013-11-14

    Test Case Code: {Code} var appWindow = Ti.UI.createWindow({ height:Ti.UI.FILL, width:Ti.UI.FILL, backgroundColor:'red' }); var tableView = Ti.UI.createTableView({ separatorStyle:'NONE', backgroundColor:'#FFFFFF' }); var data = [{title:"App 1",count:"3"}, {title:"App 2",count:"6"}, {title:"App 3",count:"3"}, {title:"App 4",count:"6"}, {title:"App 5",count:"4"}, {title:"App 6",count:"2"}]; var customRow =[]; for(var i=0;i

JSON Source