You can place an opaque view with a black background according to the view you want to smooth. By default, this value will have an alpha value of 0 and therefore will be transparent. Then you can use the UIView animation to set the black alpha representations from 0 to 0.5 (say), and then back.
Note. The code below has not been tested, but I used a similar effect to achieve the same effect.
... dimView.alpha = 0.0f; [UIView beginAnimations@ "fade" context:nil]; [UIView setAnimationDuration:0.5f]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; [UIView setAnimationRepeatAutoreverses:YES]; dimView.alpha = 0.5f; [UIView commitAnimations]; ... } - (void) animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { dimView.alpha = 0.0f; }
teabot
source share