I am animating a UILabel over a custom but开发者_如何学Cton. I want it to appear as though the UILabel is "rolling onto" the button from the right.
My plan is to position the label 50 pixels to the right of the button, begin animation, move it to its correct position, and commit animation. However, throughout the animation I want to clip the label to the frame of the button, so that you only see the piece of the label that overlaps the button and nothing hanging over to the right.
What's the best way to do this?
Thanks.
You should be able to add the label as a subview of your button before animating. Then set your the clipsToBounds property of your button to YES.
精彩评论