If you want to give your application a good look, you can try with this cool animations. Which will make your app look creative and eye catching.
You only have to add this method into UIUtility class and pass the UIView as a parameter, which can be a UIButton or UIImageView etc.
You only have to add this method into UIUtility class and pass the UIView as a parameter, which can be a UIButton or UIImageView etc.
Code:
+ (void) addShrinkEffectOn:(UIView*)myView
{
[UIView transitionWithView:myView duration:2.0 options:UIViewAnimationOptionTransitionNone animations:^(void)
{
CGRect newRect = myView.frame;
CGPoint center= myView.center;
newRect.size.width /= 5;
myView.frame = newRect;
myView.center = center;
} completion:^(BOOL finished)
{
// task to be done after completion of animation
}];
}
Now call this method on the click of a button. You will observe that when you will click on this button, its width starts reducing animatedly. As soon as the animation gets over a completion block will be called. Add rest of your code into that block which you want to perform on the click of a button.
0 comments:
Post a Comment