Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3289] iOS: tableView rows display in background when backgroundColor: 'transparent'

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-08-02T04:22:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.0.1
ComponentsiOS
Labelsmodule_tableview, qe-testadded
ReporterJon Alter
AssigneeNeeraj Gupta
Created2011-04-15T03:41:23.000+0000
Updated2012-08-10T11:32:57.000+0000

Description

If backgroundColor:'transparent' in a tableView the original rows can be seen behind the search results

To Reproduce

Step 1: run code below
Step 2: search for something
Step 3: notice that if you search for 1 or 2 you will see the original 4 rows behind the search results, and if you search for anything else all you will still see the original 4 rows

Titanium.UI.setBackgroundColor('#fff');

var win = Titanium.UI.createWindow();

var search = Titanium.UI.createSearchBar({
    hintText: "Search",
    barColor:'#0055ad'
});

var data = [
    {title: '1'},
    {title: '2'},
    {title: '12'},
    {title: '21'}   
];

var tableview = Titanium.UI.createTableView({
    backgroundColor:'transparent',
    separatorStyle: Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,
    search:search,
    data:data
});

win.add(tableview);
win.open();

Tested

TiSDK 1.6.0, iOS SDK 4.2, iPhone4 iOS 4.2.1

Associated Helpdesk Ticket

http://developer.appcelerator.com/helpdesk/view/76331">http://developer.appcelerator.com/helpdesk/view/76331

Comments

  1. Brice 2011-04-15

    Hello,
    just to add info; if the background of the tableview is set to a color, then when you do a search it's fine, but if you do another search, you see the separator beneath the filtered rows.

  2. Adam Campbell 2011-04-15

    The same issue occurs when simply setting a tableview to have background: 'transparent' and you drag it down or up. You can see the rows behind the table.

    I was able to resolve the issue by setting the tableview's background image to match my window's background image, I suppose just covering the glitchy rows.

  3. Jeff Haynie 2011-04-15

    (from [2099b2d022a9a33c1d66125fc8c20524679af803]) [#3289 state:fixed-in-qa] Make sure main table data is not shown when being filtered by a search term https://github.com/appcelerator/titanium_mobile/commit/2099b2d022a9a33c1d66125fc8c20524679af803"> https://github.com/appcelerator/titanium_mobile/commit/2099b2d022a9...

  4. Pierre Debut 2011-04-15

    Hi
    I made the changes to the file TiUITableView.m in the folder of my application but it does not work.
    Are there any other operations to be performed ?

  5. Natalie Huynh 2011-04-15

    Tested with
    Simulator 4.1
    iPhone4 4.3
    Emulator 2.1

  6. Blain Hamon 2011-04-15

    Reopening. The cure was worse than the disease.

  7. Reggie Seagraves 2011-04-15

    Moving this along with most tableview items to 1.8.0.

  8. Junaid Younus 2012-05-15

    Tested with 2.0.1GA2 on the iOS simulator, unable to reproduce. Ticket closed.
  9. Kanat Asanbekov 2012-07-16

    Titanium Studio, build: 2.1.1.201207121732 Titanium SDK: 2.2.0.v20120716092112 Devices: iPod Newton 4.3.5
  10. Shyam Bhadauria 2012-08-02

    Re-opening to edit label

JSON Source