彈出? :?
? ? UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
? ? [windowaddSubview:self];
? ? [UIView animateWithDuration:0.25
? ? ? ? ? ? ? ? ? ? ? ? ? delay:0 options:UIViewAnimationOptionCurveEaseOut
?? ? ? ? ? ? ? ? ? ? animations:^{
? ? ? ? CGRectframe =self.backView.frame;
? ? ? ? frame.origin.y= frame.origin.y- frame.size.height;
? ? ? ? self.backView.frame= frame;
? ? }completion:^(BOOLfinished) {
? ? }];
退出:
? ? [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
? ? ? ? CGRectframe =self.backView.frame;
? ? ? ? frame.origin.y= frame.origin.y+ frame.size.height;
? ? ? ? self.backView.frame= frame;
? ? ? ? self.alpha=0;
? ? }completion:^(BOOLfinished) {
? ? ? ? [self removeFromSuperview];
? ? }];