Transparent background in grouped UITableView - iPhone

前端 未结 4 1818
再見小時候
再見小時候 2020-12-30 00:50

I want to make the grouped UITableView transparent. I partially succeded with the following code:

UIColor *bgColor = [[UIColor alloc] initWithWhite:1 alpha:0         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 01:41

    remove UITableView backgroundView

    xxx.backgroundView = nil;
    

    This is necessary on iPad builds. When compiling to run on iPad and iPhone, check the tableView responds to the selector with ...

    if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) {
        [self.tableView setBackgroundView:nil];
    }
    

提交回复
热议问题