0

I am using a simple animation to change(example word on UIview) like next slide, it is a animation from right to left everything on UIView. But I don't understand when, it is animating I have black background for 1 second. It is possible to change this color?

My code is bellow:

-(void)nextSlide
{
    CATransition *animation = [CATransition animation];
    [animation setDelegate:self];
    [animation setType:kCATransitionPush];
    [animation setSubtype:kCATransitionFromRight];

    [animation setDuration:0.50];
    [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];

    [self.view.layer addAnimation:animation forKey:kCATransition];
}

Thank you for replies.

ekostadinov
  • 6,880
  • 3
  • 29
  • 47
PatrikD
  • 379
  • 4
  • 16
  • The view you are trying to animate is the root view of the view controller and the default background colour when you remove the view is black. Try adding different view then animate it. – Allan Macatingrao Sep 02 '14 at 08:47
  • I have it like this Level1Controller – PatrikD Sep 02 '14 at 08:58
  • I a word just ADD ANOTHER VIEW BEHIND with the colors you want. You may prefer to make your main view CLEAR. – Fattie Sep 02 '14 at 09:52

0 Answers0