Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 动画后显示视图_Iphone_Ios_Animation_Uiview - Fatal编程技术网

Iphone 动画后显示视图

Iphone 动画后显示视图,iphone,ios,animation,uiview,Iphone,Ios,Animation,Uiview,我正在使用页面卷曲动画。我在视图中显示一个问题,当我点击按钮时,它会使页面卷曲并显示黑色屏幕。但我想在卷起页面后用不同的问题再次显示相同的视图。如何在页面卷曲动画之后以不同的问题显示相同的视图 我正在使用下面的代码 [UIView beginAnimations:@"partialPageCurlUp" context:nil]; [UIView setAnimationDuration:1.5]; [UIView setAnimationsEnabled:YES]; [

我正在使用页面卷曲动画。我在视图中显示一个问题,当我点击按钮时,它会使页面卷曲并显示黑色屏幕。但我想在卷起页面后用不同的问题再次显示相同的视图。如何在页面卷曲动画之后以不同的问题显示相同的视图

我正在使用下面的代码

[UIView beginAnimations:@"partialPageCurlUp" context:nil];
    [UIView setAnimationDuration:1.5];
    [UIView setAnimationsEnabled:YES];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationsEnabled:YES];
    [UIView
     setAnimationTransition: UIViewAnimationTransitionCurlUp
     forView:self.view cache:YES];
    [UIView commitAnimations];

    [super viewDidLayoutSubviews];
   [UIView animateWithDuration:1.5 delay:.00 options:UIViewAnimationTransitionFlipFromLeft animations:^
   {
     //here you should write animation code 
   [UIView
      setAnimationTransition: UIViewAnimationTransitionCurlUp
      forView:self.view cache:YES];
   }

   completion:^ (BOOL finished) {

                if (finished) {
                         // Here You may show Next Question as animation  gets stop;
                     } 
               }];
只是想知道下一步该怎么做

[UIView animateWithDuration:0.25 animations: ^{ // your animation code hear } completion:^ (BOOL finished) { if (finished) { // Your Animation Completion call back. NSLog(@"Is completed"); } } ];

试试这个方法。

看,您只需要实现更多的东西

在现有代码中添加动画停止选择器,以便获得动画结束点并显示下一个问题

[UIView setAnimationDidStopSelector:@selector(animationDidStopFinished)];
animationDidStopFinished
这将是另一种
方法
您应该编写一些代码,在动画完成时显示另一个问题

或者使用下面的代码

[UIView beginAnimations:@"partialPageCurlUp" context:nil];
    [UIView setAnimationDuration:1.5];
    [UIView setAnimationsEnabled:YES];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationsEnabled:YES];
    [UIView
     setAnimationTransition: UIViewAnimationTransitionCurlUp
     forView:self.view cache:YES];
    [UIView commitAnimations];

    [super viewDidLayoutSubviews];
   [UIView animateWithDuration:1.5 delay:.00 options:UIViewAnimationTransitionFlipFromLeft animations:^
   {
     //here you should write animation code 
   [UIView
      setAnimationTransition: UIViewAnimationTransitionCurlUp
      forView:self.view cache:YES];
   }

   completion:^ (BOOL finished) {

                if (finished) {
                         // Here You may show Next Question as animation  gets stop;
                     } 
               }];
你检查过了吗?也检查一下这个:-检查。