InitialsImageView icon indicating copy to clipboard operation
InitialsImageView copied to clipboard

UIGraphicsGetCurrentContext is nil

Open dmachacon opened this issue 6 years ago • 3 comments

This happens randomly. After a few scene changes, UIGraphicsGetCurrentContext returns nil.

screen shot 2018-06-11 at 10 33 17 pm

dmachacon avatar Jun 11 '18 14:06 dmachacon

Getting this as well.

ClaudeSutterlin avatar Jun 14 '18 22:06 ClaudeSutterlin

This is probably because your frame is .zero when you're setting the image (if you're using AutoLayout). You can either set the frame manually, or layoutIfNeeded before you set the image.

SirensOfTitan avatar Jun 28 '18 17:06 SirensOfTitan

Was facing the same issue

@SirensOfTitan thanks for the tip. This fixed my issue

melakamc avatar Nov 01 '18 02:11 melakamc