zoukankan      html  css  js  c++  java
  • iOS之用uilabel弹出消息提示框

    UILabel *cover = [[UILabel alloc] init];

        cover.frame = CGRectMake(0, 0, 150, 30);

        cover.center = CGPointMake(self.view.frame.size.width * 0.5, self.view.frame.size.height * 0.5);

        cover.font = [UIFont systemFontOfSize:12];

        cover.text = [NSString stringWithFormat:@"成功安装%@", app.name];

        cover.textColor = [UIColor whiteColor];

        cover.textAlignment = NSTextAlignmentCenter;

        cover.backgroundColor = [UIColor blackColor];

        cover.alpha = 0.0;

        cover.clipsToBounds = YES;

        cover.layer.cornerRadius = 5;

        [self.view addSubview:cover];

        

        [UIView animateWithDuration:0.5 animations:^{

            cover.alpha = 0.5;

        } completion:^(BOOL finished) {

            [UIView animateWithDuration:0.5 delay:0.5 options:UIViewAnimationOptionCurveEaseInOut animations:^{

                cover.alpha = 0.0;

            } completion:^(BOOL finished) {

                [cover removeFromSuperview];

            }];

        }];

  • 相关阅读:
    五月八日冲刺
    五月七号冲刺
    五月六日站立会议
    prufer序列学习笔记
    批量数据导入优化
    索引失效
    慢查询定位与分析
    redis主从同步
    redis RBD机制
    redis AOF机制
  • 原文地址:https://www.cnblogs.com/changxs/p/4045957.html
Copyright © 2011-2022 走看看