アルファをアニメーション化して作成した UIView をフェードインしようとしています。フェード インし、数秒間表示したままにしてから、フェード アウトする必要があります。
フェードアウト機能は正常に動作します。視界がスムーズに消えます。ただし、フェードインは、ビューが 0.5 秒間隔でゆっくりと表示されるのではなく、即座に表示されるだけです。
そのため、アニメーションのフェードが機能していないようで、アルファを即座に に設定するだけ1.0です。私はここで途方に暮れています。私が間違っていることはありますか?ありがとう!
-(void)presentPopupPhrase:(NSString *)phrase 
                   inView:(UIView *)view 
             withDelegate:(id)delegate 
            andCompletion:(void (^)(BOOL completed))completion {
    MessagePopupView *pv = [[[MessagePopupView alloc] initWithFrame:self.frame andText:phrase] autorelease];
    pv.alpha = 0.0;
    [view addSubview:pv];
    [self fadeInMPV:pv 
       withDuration:self.fadeDuration 
           andDelay:self.fadeInDelay];
    [self fadeOutMPV:pv 
        withDuration:self.fadeDuration 
          afterDelay:self.fadeOutDelay 
      withCompletion:completion 
         andDelegate:delegate];
}
-(void)fadeInMPV:(MessagePopupView *)mpv 
    withDuration:(NSTimeInterval)duration 
        andDelay:(NSTimeInterval)delay 
{    
    [UIView animateWithDuration:duration 
                          delay:delay 
                        options:UIViewAnimationOptionCurveLinear 
                     animations:^{
                         mpv.alpha = 1.0;
                     } 
                     completion:nil];
}
-(void)fadeOutMPV:(MessagePopupView *)mpv
     withDuration:(NSTimeInterval)duration
       afterDelay:(NSTimeInterval)delay
     withCompletion:(void (^)(BOOL completed))completion
      andDelegate:(id)delegate 
{
    [UIView animateWithDuration:duration 
                          delay:delay 
                        options:UIViewAnimationOptionCurveLinear 
                     animations:^{
                         mpv.alpha = 0.0;
                     } 
                     completion:completion];
}
編集:
それが役立つ場合は、呼び出し元の VC コードを次に示します。
-(void)viewDidAppear:(BOOL)animated {
    CGRect phraseFrame = CGRectMake(20, 341, 280, 65);
    PopupPhraseController *phraseController = [[[PopupPhraseController alloc] initWithFrame:phraseFrame] autorelease];
    [phraseController presentPopupPhrase:@"Test Phrase" inView:self.view withDelegate:self andCompletion:^(BOOL completed){
        if (completed) {
            NSLog(@"completed");
        } else {
            NSLog(@"not completed");
        }
        NSLog(@"blocked!");
    }];
    [super viewDidAppear:animated];
}