想知道如何移动UILabel

问题描述

| 很抱歉,对于这个问题有一个愚蠢的简单答案,但是我一直在互联网上四处寻找一个简单的简单答案,但还没有真正找到答案。我要做的就是在iPad屏幕上将UILabel从一个位置转移到另一个位置。我不希望它是瞬时的,我希望它是动画的,那么我该怎么做?任何帮助(对愚蠢的问题有很大的耐心^ _ ^;)将不胜感激!     

解决方法

        
[UIView beginAnimations:@\"myMoveAnimation\" context:nil];  
aUIButton.center = CGMakePoint(newX,newY);
[UIView commitAnimations];
对于lambda爱好者...
[UIView animateWithDuration:secondsToTake delay:0
        options: UIViewAnimationOptionCurveEaseIn
        animations:^{
          aUIButton.center = CGPointMake(newX,newY);
        }
        completion:^(BOOL finished){ /* Some code for to run when complete /* }];