UIImageView * frontImageView = [[UIImageView alloc] initWithImage:[UIImage
imageNamed:@"view.png"]];
UIView * containerView = [[UIView alloc] initWithFrame:frontImageView.bounds];
containerView.center = self.view.center;
[self.view addSubview:containerView];
[containerView addSubview:frontImageView];
UIImageView * backImageView = [[UIImageView alloc] initWithImage:[UIImage
imageNamed:@"view.png"]];
backImageView.center = frontImageView.center;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:containerView
cache:YES];
[frontImageView removeFromSuperview];
[containerView addSubview:backImageView];
[UIView commitAnimations];
i wanna Flip the containerView,but it doesn't work.
This is a similar post about the same problem. @Jason Harwig suggests that you try:
Try using
self.view.superviewin the animation transition view of theshowMoreInfo:
EDIT: Looking at another post, it seems as though adding the subview BEFORE commiting the animations is the problem. Why don't you try that?
Hope that Helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With