iOS在动画之后执行动画,每个动画之间都有延迟

iOS在动画之后执行动画,每个动画之间都有延迟,ios,objective-c,uianimation,Ios,Objective C,Uianimation,我有一个数组,其中有一些按钮的标签,例如:[8,5,12,4,14,29,3,2,24,2,7] 想象一下我所有的按钮都被隐藏了。 我只是想取消隐藏我的按钮,其中的标签是在一个淡入淡出动画阵列。 每个按钮应在另一个按钮后解锁 当我为它创建一个循环时,所有的动画都会互相执行,并且它会将所有按钮一起取消隐藏,或者很快取消隐藏,不会有任何延迟 我该怎么办 这是我的密码: - (void)AnimateArrayforIndex: (int)index{ [UIView animateW

我有一个数组,其中有一些按钮的标签,例如:[8,5,12,4,14,29,3,2,24,2,7]

想象一下我所有的按钮都被隐藏了。 我只是想取消隐藏我的按钮,其中的标签是在一个淡入淡出动画阵列。 每个按钮应在另一个按钮后解锁

当我为它创建一个循环时,所有的动画都会互相执行,并且它会将所有按钮一起取消隐藏,或者很快取消隐藏,不会有任何延迟

我该怎么办

这是我的密码:

- (void)AnimateArrayforIndex: (int)index{
        [UIView animateWithDuration:1 delay:1 options:UIViewAnimationOptionTransitionCrossDissolve | UIViewAnimationOptionAllowAnimatedContent animations:^{
            [self hideAllButtons];
            [self unHideButtonWithTag:[_arr objectAtIndex:index]];

        } completion:^(BOOL animationFinished) {
            if (animationFinished){
                if (index<[_arr count]-1)
                    [self AnimateArrayforIndex:index+1];
            }
        }];

}
-(void)animatarrayforindex:(int)index{
[UIView animateWithDuration:1延迟:1选项:UIViewAnimationOptionTransitionCross溶解| UIViewAnimationOptionLowAnimatedContent动画:^{
[自我隐藏按钮];
[self unHideButtonWithTag:[u arr objectAtIndex:index]];
}完成:^(BOOL animationFinished){
如果(动画完成){

如果(indexUse dispatch_after延迟了吗?非常感谢。它成功了:)