Unable to change background color of static table view cell on iOS 7 (iPad)

前端 未结 6 2120
礼貌的吻别
礼貌的吻别 2021-02-05 01:00

I am unable to change the background color of static UITableViewCells on iOS 7, when running on iPad device. You can easily check this with following setup:

  • Make a
6条回答
  •  无人及你
    2021-02-05 01:45

    Do this:

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
         UIImage *pattern = [UIImage imageNamed:@"image.png"];
         [cell setBackgroundColor:[UIColor colorWithPatternImage:pattern]];  
    }
    

    Work for me on IOS7

提交回复
热议问题