In TwUI
, there is a method called redraw
on TUIView
. It forces the view to redraw, but it also comes with a free fading animation between
Use +[UIView transitionWithView:duration:options:animations:completion:]
with the UIViewAnimationOptionTransitionCrossDissolve
option, and inside the animation block, force the view's layer to redraw its contents immediately.
[myView setNeedsDisplay];
[UIView transitionWithView:myView duration:1
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
[myView.layer displayIfNeeded];
} completion:nil];