Removing image from UIImageView

前端 未结 5 912
清酒与你
清酒与你 2021-02-01 00:44

I load a UIImageView with an image depending on user interaction. When the parent view is initially displayed, no image has been selected and the imageview is blac

5条回答
  •  深忆病人
    2021-02-01 01:14

    Try stating [self.imageView setNeedsDisplay]; after your image setting to nil. This will trigger a redraw of that element on the next runloop cycle I believe. Aka you are marking this view as 'dirty' and needs a redraw.

提交回复
热议问题