1

I am using the standard flip code to move from one view controller to another like this:

    tcvc = [self.storyboard instantiateViewControllerWithIdentifier:@"SB_TrebleClefStaffViewController"];

    [tcvc.view setFrame:CGRectMake(0, 0, 0, 0)];
    [UIView transitionWithView:staffContainer
                      duration:1
                       options:UIViewAnimationOptionTransitionFlipFromLeft
                    animations:^ { [staffContainer addSubview:tcvc.view ]; }
                    completion:nil];

This works but I can see the background of the view controller and I only want to see the content of the view controller flip with the background being transparent. I have set the staffContainer and tcvc alpha to 0 but the background is still there. Any help would be greatly appreciated.

Update***

Screenshot: the dark background is added when the staffContainer is being flipped, once it is in position the background is transparent. The main background of the whole app is white.

Can't post image directly so here is a link to a screenshot.

http://postimg.org/image/dtey0ajhf/

  • Could you show a screenshot? It's kind of hard to picture it. – Undo Nov 27 '13 at 03:48
  • look at this http://stackoverflow.com/questions/4622996/how-to-do-the-flip-animation-between-two-uiviewcontrollers-while-clicking-info-b – Sport Nov 27 '13 at 03:51
  • Your question is unclear. When the view is flipped 90 degrees, you can see what's behind it. What do you want to see there? – rdelmar Nov 27 '13 at 04:40
  • I added a screenshot in the main post. – user1857226 Nov 27 '13 at 06:08
  • When the view is flipped 90 degrees and you see what is behind it is not the issue. It's the background of the UIView that becomes darker when it is being animated, I would like it to not be part of the animation, just the staff and note should flip. Thanks for the link Sport, but it seems to be just a different way to do the same animation, which has the same graphical issue. – user1857226 Nov 27 '13 at 23:30

1 Answers1

0

I was having the same issue with a single view (Not a view controller).

I solved it by editing the following properties via the Interface Builder (programmatically should work as well):

  • setting the background of the view to Clear Color and
  • setting the view to non opaque

I did not try it but I beleive setting the view of the VC should work.

Eduard
  • 21
  • 3