Hi,
I'm working on an iPhone app which needs to have the function to reveal an image after some actions.
For example:
I have 2 UIImages on top of each other. The UIImage on the back is the image to reveal. The UIImage on top needs to cover this image. I need a method that I can tell to reveal the image. So if I call the method, and let's say I give as a parameter 50 (which stands for 50%) the half of the pixels of the top UIImage need to be set to opacity 0. I know that I have to read the image into data, and then I can edit pixels. But I need to edit random pixels, otherwise if I call the method with 50 the top of the image is already visible. So I need to set the opacity of the pixels to 0, but random. This will give you a kind of "snow" effect, and for example when I call the method and give 100 as parameter this means that 100% of the pixels have to get the opacity of 0, so the complete picture is visible.
The random is important, because using random, this reveals the image slowly instead of revealing half of the image because than the fun is over ;-)
To make it easy: The image to edit the pixels from is ALWAYS 320x480. I only use landscape!
I hope somebody can help me, that would be great!
Thanks in advance!