yeforriak
yeforriak

Reputation: 1715

Three20 TTTableItem elements background colour changed to white in IOS5

I have a TTTableViewController with a background image in which I insert items of type TTTableLink. Running the app if I drag the cells out of the screen by scrolling up and down for example, when they enter the screen again their background colour is changed to white. I have noticed this problem only in iOS5.

I don't really get when the background is changed, any ideas of how to preserve clear background for the table cells

Here is my code:

-(void) loadView {
    [super loadView];   
    UIImage *backgroundImage = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"imageName" ofType:@"png"]];
    UIImageView *backgroundView = [[UIImageView alloc] initWithImage:backgroundImage];
    backgroundView.frame = CGRectMake(0, 0, 320, 416);
    [self.view addSubview:backgroundView];
    [self.view sendSubviewToBack:backgroundView];
    [backgroundView release];
    self.tableView.backgroundColor = [UIColor clearColor];
  }

-(void) createModel {
    TTListDataSource* listDataSource= [[[TTListDataSource alloc] init] autorelease];
    TTTableLink *item = [TTTableLink itemWithText:itemName URL:targetURL];
    [listDataSource.items addObject:item];
  }

Upvotes: 1

Views: 220

Answers (1)

aporat
aporat

Reputation: 5932

There's a pending pull request on three20 which fixes this issue. see https://github.com/facebook/three20/pull/689. post a comment on it, so the repo owner will merge it. I think he forgot about this project :-)

or you can either fix it by changing that line in your source code

Upvotes: 1

Related Questions