UIButton kann nicht berührt werden, während Sie mit UIView animateWithDuration animiert sind

Ich habe den folgenden code:

[UIView animateWithDuration:0.3
                      delay:0.0
                    options:UIViewAnimationCurveEaseOut | UIViewAnimationOptionAllowUserInteraction
                 animations:^{
                     CGRect r = [btn frame];
                     r.origin.y -= 40;
                     [btn setFrame: r];
                 }
                 completion:^(BOOL done){
                     if(done){
                         [UIView animateWithDuration:0.3
                                               delay:1
                                             options:UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionAllowUserInteraction
                                          animations:^{
                                              CGRect r = [btn frame];
                                              r.origin.y += 40;
                                              [btn setFrame: r];
                                          }
                                          completion:^(BOOL done){if(done) zombiePopping = 0; }];
                     }

                 }];

Das problem ist, es scheint die Schaltfläche nicht reagieren, um Akzente und animiert obwohl ich mit UIViewAnimationOptionAllowInteractiondas ist ein wenig komisch zu mir.

Vielleicht die meisten getan werden, mit Core Animation zu arbeiten? und wenn ja, wie würde ich gehen?

InformationsquelleAutor der Frage Shai Mishali | 2011-12-01

Schreibe einen Kommentar