UITableView background Image

前端 未结 12 2072
情歌与酒
情歌与酒 2021-01-29 21:21

I\'am trying to setup a png image as my tableview\'s background. With the following code all are fine! But only on iPhone Simulator. If I try to run the application on an iPhone

12条回答
  •  你的背包
    2021-01-29 22:06

    UIImageView *imageviewTemp = [[UIImageView alloc] init];
    [(UIImageView *)imageviewTemp sd_setImageWithURL:[NSURL URLWithString:self.stringOfPassedImage]];
    [imageviewTemp setFrame:self.tableView.frame];
    self.tableView.backgroundView = imageviewTemp;
    

提交回复
热议问题