Skip to content

Instantly share code, notes, and snippets.

@yimajo
Created July 24, 2012 20:45
Show Gist options
  • Save yimajo/3172557 to your computer and use it in GitHub Desktop.
Save yimajo/3172557 to your computer and use it in GitHub Desktop.
良い感じにViewをポップアップしてくれるアニメーション
- (void)popupView:(UIView *)view
{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,0.5f,0.5f);
[UIView animateWithDuration:0.2
delay:0.0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,1.2f,1.2f);
}
completion:^(BOOL finished){
[UIView animateWithDuration:0.1
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,0.9f,0.9f);
}
completion:^(BOOL finished) {
[UIView animateWithDuration:0.1
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity,1.0f,1.0f);
}
completion:nil
];
}
];
}
];
}
@yimajo
Copy link
Author

yimajo commented Jul 24, 2012

gist先生がハードタブの幅を広く表示してくれて頭悪い感がするので s/¥t/ /g した

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment