Here is another idea.
Set the background of your UIView *view to the image.png you want with alpha = 0.5. Let be
w = view.bounds.size.width; h = view.bounds.size.height;
Create another UIView *glassView also with alpha = 0.5 and add it as a preview:
[view addSubview:glassView]
Create a UIImageView *glassImageView and set its image to image.png , and then add it as a glassView :
[glassView addSubview:glassImageView]
Now adjust the animation to increase the height and alpha of the glassView , while maintaining the size of the imageGlassView , something like this:
[UIView beginAnimations:nil context:NULL]; { [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0]; [UIView setAnimationDelegate:self]; glassView.alpha = 1.0; glassView.frame = CGRectMake(0.0, 0.0, w, h); glassImageView.frame = CGRectMake(0.0, 0.0, w, h); } [UIView commitAnimations];
To be fair, I have not tested this, but something in this direction seems like it might work. Again, maybe not. If you find the perfect solution, return it back. I would like to know how to do it!
source share