根据视图位置动画UIView alpha

时间:2013-09-08 09:59:00

标签: ios objective-c animation uiview

我使用此代码制作视图动画但想根据其位置设置orb的alpha。这是可能的,因为我知道动画块是立即执行的,我无法访问其位置

self.orbView.center = self.arrowView.center;
    self.orbView.alpha = 1;
    [UIView animateWithDuration:1.0 delay:0 options:UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations:^{
        self.orbView.center = CGPointMake(arrowCornerRight,self.orbView.center.y);
        self.orbView.alpha = 0;
    } completion:^(BOOL finished) {
    }];

0 个答案:

没有答案