animateWithDuration:破坏平滑的进度条增量

Ilk*_*aci 7 iphone uiprogressview nsthread uiviewanimation ios

在我的一个视图中,我需要动画UIImageView的框架属性,并在执行此操作时,我想在导航栏的标题视图中显示进度条(UIProgressView).问题是如果我注释掉以下动画阻止进度条按预期顺利更新.另一方面,由于以下动画,进度条在几个位置停止并再次递增.

//add message bubble
[UIView animateWithDuration:0.3
                      delay:0
                    options:UIViewAnimationOptionAllowUserInteraction
                  animations:^
 {
     animationBubbleImageView.alpha = 1;
 }
                 completion:^(BOOL finished)
 {
     [self removeAutoCorrectionAndHighlight];
     [UIView animateWithDuration:0.3
                           delay:0
                         options:UIViewAnimationOptionAllowUserInteraction
                      animations:^
      {
          CGRect bubbleFrame = CGRectMake(animationBubbleImageView.frame.origin.x,
                                          animationBubbleImageView.frame.origin.y,
                                          bubbleSize.width,
                                          bubbleSize.height);

          [animationBubbleImageView setFrame:bubbleFrame];
          messageLabel.alpha = 1;
      }
                      completion:^(BOOL finished)
      {
          [self sendSubviewToBack:textView];
          [self.delegate moveBubbleToTableCell];
      }];
 }];
Run Code Online (Sandbox Code Playgroud)

动画块不会阻止主线程,但是什么因为进展视图不顺畅的原因?

更新:我想要实现的是IOS中的MessagesApp气泡动画.当键入的消息变成气泡并飞到它的位置时,进度条应该缓慢增加.

如果我尝试相同的事情,你的动画进度条增量正常.

Dad*_*Dad 1

尝试将进度条动画放在与气泡动画相同的动画中。或者将它们全部放入一个动画组中。