开发者

Nested animation block caused "Segmentation fault"

开发者 https://www.devze.com 2023-01-17 09:46 出处:网络
I try to show three images, one after one, with the following code: image_1.alpha = 0.0; image_2.alpha = 0.0;

I try to show three images, one after one, with the following code:

image_1.alpha = 0.0;
image_2.alpha = 0.0;
image_3.alpha = 0.0;

[UIView animateWithDuration:0.25
                 animations:^{
                     image_1.alpha = 1.0;
                 } completion:^(BOOL finished) {
                     [UIView animateWithDuration:0.25
                                      animations:^{
                                          image_2.alpha = 1.0;
                                      } completion:^(BOOL finished) {
                                          [UIView animateWithDuration:0.25
                                                           animations:^{
                                                               image_3.alpha = 1.0;
                                                           } completion:^(BOOL finished) {
                                                               ;
                                                           }];
                                      }];
                 }];

gives: internal compiler error: Segmentation fault

There is no error if the nesting contains two animation blocks. Is nested animation block no allowed开发者_如何学Go or comes with some limitation?

0

精彩评论

暂无评论...
验证码 换一张
取 消