UIView animateWithDuration:delay:options:animate:completion not delaying

use*_*253 1 objective-c uiview uiviewanimation ios

我在SO看到了一些与此相关的问题,但是他们似乎都没有回答这个问题:这delay部分内容UIView animateWithDuration:delay:options:animate:completion:不会延迟.以下是调用它的实际代码:

-(void) viewDidAppear:(BOOL)animated
{
    NSLog(@"about to start animateWithDuration...");

    [UIView animateWithDuration:3.0 delay:2.0 options:UIViewAnimationOptionTransitionNone
                     animations:^{NSLog(@"in the animations block..."); self.textView.hidden = YES;}
                     completion:^(BOOL finished){if (finished) {NSLog(@"In the completion block..."); self.textView.hidden = NO; [self.player play];}}];
}
Run Code Online (Sandbox Code Playgroud)

这是NSLog时间戳:

2013-06-18 15:27:16.607 AppTest1 [52083:c07]即将启动animateWithDuration ...

2013-06-18 15:27:16.608动画块中的AppTest1 [52083:c07] ...

2013-06-18 15:27:16.609 AppTest1 [52083:c07]在完成块中......

可以看出,指令的执行间隔为毫秒,而不是延迟2或3秒.有谁知道这个的原因?

jsz*_*ski 7

hidden物业不具有动画效果:

UIView该类的以下属性是可动画的:

@property frame

@property bounds

@property center

@property transform

@property alpha

@property backgroundColor

@property contentStretch

尝试在动画块中使用其中一个属性,然后应该发生延迟.例如,你可以将动画alpha1.00.0,然后把它藏在完成块.