弹出提示框pop动画

2017-05-06  本文已影响34人  06f43b0b52f7

UIView *View1 = [[[NSBundle mainBundle]loadNibNamed:@"MessageWornView" owner:nil options:nil]lastObject];
View1.layer.cornerRadius = 10;

View1.frame = CGRectMake((ScreenWidth-250)/2, (ScreenHeight-150)/2, 250,150);
View1.backgroundColor = [UIColor colorWithRed:245/255.0 green:245/255.0  blue:245/255.0  alpha:1.0];
[_secreySetView addSubview:View1];
UIImageView *iamge1 = (UIImageView *)[View1 viewWithTag:10];
[iamge1 setImage:[UIImage imageNamed:@"组-26"]];
UILabel *tishimessage = (UILabel *)[View1 viewWithTag:11];


     tishimessage.text=YCLocalLanguageKey(@"prompt");
 View1.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.0, 0.0);
[UIView animateWithDuration:0.3 animations:^{
    View1.alpha = 1;
    View1.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1, 1);
} completion:^(BOOL finished) {
    [UIView animateWithDuration:.2 animations:^{
        View1.alpha = 1;
        View1.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.8, 0.8);
    } completion:^(BOOL finished) {
        [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
            View1.alpha = 1;
            View1.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1, 1);
        } completion:^(BOOL finished2) {
            View1.layer.shouldRasterize = NO;
        }];
        
    }];
}];
上一篇 下一篇

猜你喜欢

热点阅读