search

Home  >  Q&A  >  body text

objective-c - How to cancel the view's color dimming problem when transitionWithView flips UIView?

If you want to make an animation similar to flipping the front and back of a card, using the transitionWithView method of UIView will cause the color of the flipped view to darken. If the background color of the view is white, there will be flickering and black when flipping. Regarding the problem of the center line, the effect is very poor. Please give me some advice from all the experts...

[UIView transitionWithView:cardView duration:0.8f options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{
        [cardView exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
    } completion:NULL];
三叔三叔2705 days ago1055

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-21 10:13:50

        [UIView transitionFromView:self.aView toView:self.bView duration:0.5 options:UIViewAnimationOptionTransitionFlipFromLeft completion:^(BOOL finished) {
            // do something such as hidden or remove
        }];

    reply
    0
  • Cancelreply