UITableView cell with background image

后端 未结 9 783
無奈伤痛
無奈伤痛 2020-11-29 17:14

i have a UITableView, where theres 3 images. 1 for the selected Cell, 1 for the Cell background, and 1 for the TableView background.

My selected Cell, is working jus

9条回答
  •  無奈伤痛
    2020-11-29 18:11

    this sets the background for the tableView not the cell

    // CELL'S BACKGROUND-IMAGE
        self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cell_normal.PNG"]];
    

    try get set cellbackground in cellForRowAtIndexPath

     cell.backgroundColor =  [UIColor colorWithPatternImage:[UIImage imageNamed:@"cell_normal.PNG"]];
    

提交回复
热议问题