您的位置:首页 > 产品设计 > UI/UE

iOS 继承自 UIWindow 的扩展类 用来提示操作成功或者失败

2015-12-24 21:24 411 查看
- (instancetype)init

{

    self = [superinit];

    if (self) {

        self.frame =CGRectMake(0,
-40, [UIScreenmainScreen].bounds.size.width,40);

        [selfmakeKeyAndVisible];

    }

    return
self;

}

- (void)show{

    [UIViewanimateWithDuration:1animations:^{

        self.transform =CGAffineTransformMakeTranslation(0,40);

    } completion:^(BOOL finished) {

       [UIViewanimateWithDuration:1delay:1options:UIViewAnimationOptionCurveLinearanimations:^{

           self.transform =CGAffineTransformMakeTranslation(0,
-40);

       } completion:^(BOOL finished) {

           [selfresignKeyWindow];

        }];

    }];

    

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: