UITableView backgroundColor always gray on iPad

前端 未结 9 1444
小蘑菇
小蘑菇 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:58

    I think it is worth noting that as of Xcode 6.1 and iOS 8.1, specifically for iPad (if you want to set cell background as well) it seems that you must set table background AND cell background.

    For instance, on an iPhone storyboard you can set a cell to clear color, then set background image of table programmatically for a transparent table with background image. However if you were to view this same configuration on iPad the cells would not be clear. Cells will need to be set to clear programmatically for iPad.

提交回复
热议问题