UITableViewCell's imageView fit to 40x40

前端 未结 7 1784
离开以前
离开以前 2020-12-04 16:14

I use the same big images in a tableView and detailView. Need to make imageView filled in 40x40 when an imags is showed in tableView, but stretched on a half of a screen. I

7条回答
  •  [愿得一人]
    2020-12-04 16:20

    you might be able to use this?

    yourTableViewController.rowImage = [UIImage imageNamed:@"yourImage.png"];
    

    and/or

    cell.image = yourTableViewController.rowImage;
    

    and if your images are already 40x40 then you shouldn't have to worry about setting bounds and stuff... but, i'm also new to this, so, i wouldn't know, haven't played around with Table View row/cell images much

    hope this helps.

提交回复
热议问题