I am creating a UIImageView subclass to display an audio waveform. The approach is to load the file, do math, save a PNG file and then self.image = thePNG
. The nice part about this is that on a resize or repaint the UIImageView will stretch the PNG and stretch quickly.
Now if the image is expanded too much then I need to recalculate the waveform to avoid visible pixelation. Since we know that UIImageView does not call drawRect
, is there a method that is called during resize so that I can decide if redrawing is necessary?
P.S. When recalculating I will be fading in the new image after it is calculated. Hopefully this will be seamless to the user like Google Earth.