7

I have a UIView subclass. It is drawing some things based on a lot of complicated code that I would greatly prefer not to disturb for this particular purpose.

I am using the now-deprecated contentStretch property to make certain changes to my view. Apple's documentation suggests a replacement for image-based content -- see here: Replacement for UIView's contentStretch?. But it is silent on the question of what to do if the content is not image-based.

Any suggestions? In one particular case, it is for an animation.

Community
  • 1
  • 1
William Jockusch
  • 26,513
  • 49
  • 182
  • 323

1 Answers1

0

Not a true replacement, but for those that need it for an animation, to animate from one size to another, a solution could be to take a screenshot, obtain an image, use the UIImageView stretch functions and animate to this image.

Community
  • 1
  • 1
pteofil
  • 4,133
  • 17
  • 27