Bug - background properties of TableViewSection

You must Login before you can answer or comment on any questions.

Hi there,

It's been mentioned elsewhere, but with no response from the dev team and, as far as I can see, no bug logged. Although documented changing backgroundGradient and backgroundColor for instances of TableViewSection have no effect.

Anyone prepared to comment, or log the bug? Is this likely to get fixed?

Thanks,

Toby

1 Answer

I couldn't get it to work using TableViewSection so another way is to make a make a view with the layout you want and set it as the headerView of a section.

header = Ti.UI.createView({
   backgroundColor:'black',
   height:'auto'
});
headerLabel = Ti.UI.createLabel({
   font:{fontSize:14,fontWeight:'bold'},
   text:'Details',
   color:'white',
   textAlign:'left',
   top:0,
   left:10
});
header.add(headerLabel);
section = Ti.UI.createTableViewSection({headerView:header);
 
// Then create table rows as needed and add then to section

— answered 3 years ago by Andrew Burgess
answer permalink
2 Comments
  • Thanks for this, I'll have a look and let you know how I get on.

    — commented 3 years ago by Toby Mathews

  • Thanks for the post, it didn't really help me I'm afraid - performance became extremely laggy on the simulator (iPad) and unusable on the device itself - seems to be the same problem with TableViews with rows containing other controls (labels etc), when the number of rows is 'large'.

    — commented 3 years ago by Toby Mathews

Your Answer

Think you can help? Login to answer this question!