I have a UILabel called “nameLabel” and I have it inside an animation block so that this happens:
_nameLabel.alpha = 1;
CGAffineTransform translate = CGAffineTransformMakeTranslation(50, 50);
_nameLabel.transform = translate;
I thought that animates the UILabel to the spot I specify but it just animates from the above spot to the place where I have it in the Interface Builder. Any help here?
Can you post the animation block and other associated code? I am not sure what
CGAffineTransformMakeTranslationdoes with the label, but if you want to animate the frame location, you can use this:Edit: The other way:
Current state is probably the current location of the label, try that first but if nothing happens, remove
UIViewAnimationOptionBeginFromCurrentStateor set the frame of the label to another location before the animation, and move it to its initial (the one in the xib file) position in the animation block, its your call.