Ipad UIPopoverViewController呈现ModalviewController动画

Ipad UIPopoverViewController呈现ModalviewController动画,ipad,uiviewcontroller,uipopovercontroller,presentmodalviewcontroller,caanimation,Ipad,Uiviewcontroller,Uipopovercontroller,Presentmodalviewcontroller,Caanimation,我正在开发一款iPad应用程序。我有一个viewcontroller,我想在popover控制器中显示它。但我还想在modalview中演示时为popover添加自定义动画。如何在显示和取消模式视图时向popover添加自定义动画 下面是我的代码: Myviewcontroller *myViewController = [[Myviewcontroller alloc] initWithNibName:@"Myviewcontroller" bundle:nil]; UINavigationC

我正在开发一款iPad应用程序。我有一个viewcontroller,我想在popover控制器中显示它。但我还想在modalview中演示时为popover添加自定义动画。如何在显示和取消模式视图时向popover添加自定义动画

下面是我的代码:

Myviewcontroller *myViewController = [[Myviewcontroller alloc] initWithNibName:@"Myviewcontroller" bundle:nil];
UINavigationController *navController=[[UINavigationController alloc] initWithRootViewController:myViewController];
myViewController.contentSizeForViewInPopover=CGSizeMake(900, 600);
UIPopoverViewController popOVer = [[UIPopoverController alloc]
                initWithContentViewController:navController];
 [popover presentPopoverFromRect:CGRectMake(37, 90, 950, 560) inView:self.view permittedArrowDirections:0 animated:NO];
我想添加到上述popoverViewController的动画是:

CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:(2 * M_PI) * 3]; // 3 is the number of 360 degree rotations

rotationAnimation.duration = 1.0f;
rotationAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];

CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnimation.fromValue = [NSNumber numberWithFloat:0.0];
scaleAnimation.toValue = [NSNumber numberWithFloat:1.0];
scaleAnimation.duration = 1.0f;
scaleAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];

CAAnimationGroup *animationGroup = [CAAnimationGroup animation];
animationGroup.duration = 1.0f;
[animationGroup setAnimations:[NSArray arrayWithObjects:rotationAnimation, scaleAnimation, nil]];

现在我的问题是如何将此动画添加到popOverViewController本身。由于Popover没有任何视图属性,因此我无法向其添加任何动画。如果我将动画添加到popover内的viewcontroller中,则popover会停留在其位置,并且其内的视图会设置动画,这看起来不太好。

无法完成,popover不是视图控制器