簡體   English   中英

在iOS 5中,Three20 TTTableItem元素的背景顏色更改為白色

[英]Three20 TTTableItem elements background colour changed to white in IOS5

我有一個帶有背景圖片的TTTableViewController,在其中插入了TTTableLink類型的項目。 例如,如果我通過上下滾動將單元格拖出屏幕,則運行該應用程序,當它們再次進入屏幕時,其背景色將變為白色。 我僅在iOS5中注意到此問題。

當背景改變時,我真的不明白,關於如何為表格單元格保留清晰背景的任何想法

這是我的代碼:

-(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];
  }

在three20上有一個待處理的請求,它可以解決此問題。 參見https://github.com/facebook/three20/pull/689 發表對此的評論,以便回購所有者將其合並。 我想他忘了這個項目了:-)

或者您可以通過在源代碼中更改該行來修復它

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM