UITableView backgroundColor always gray on iPad

前端 未结 9 1466
小蘑菇
小蘑菇 2020-11-30 18:02

When I set the backgroundColor for my UITableView it works fine on iPhone (device and simulator) but NOT on the iPad simulator. Instead I get a lig

9条回答
  •  囚心锁ツ
    2020-11-30 18:53

    Thanks a lot for this solution. I applied this on a UITableView property with IBOutlet in a UIViewController and it works well like:

    [panelTable setBackgroundView:nil];
    [panelTable setBackgroundView:[[[UIView alloc] init] autorelease]];
    [panelTable setBackgroundColor:UIColor.clearColor]; // Make the table view transparent
    

提交回复
热议问题