is there a possibility to animate an uibutton in this way that a thing or whatever comes out of the background e.g. a wheat ear comes out of a field.
is this possible?
thanks 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless you want a more complicated animation, you can just create a custom type UIButton (either with IB by changing the type to Custom, or programmatically with
UIButton *aButton = [UIButton buttonWithType:UIButtonTypeCustom]), then set the button’s image with[aButton setImage:[UIImage imageNamed:@"wheat_ear" forState:UIControlStateNormal].To move it, just animate its position normally…
Or, to provide the illusion of it coming out of the field, animate the bounds of the image so that it starts with the image’s width and zero height, and ends with the image’s width and height: