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];
나는 containerView를 뒤집기를 원하지만 작동하지 않습니다.뒤집기 방법?
미안 해요, 내가 superview 싶지 않아, 난 그냥 컨테이너보기를 돌려주고 싶다 –
고마워, 그냥 그 문제. 매우 감사합니다 –
문제 없습니다! 다행스럽게 도울 수있어! – msgambel