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];

            }];

        }];

  • 相关阅读:
    traceroute工作原理
    Android 关于资源适配
    JavaScript对象
    八大排序算法总结
    Linux pipe函数
    cocos2d-x读取xml(适用于cocos2d-x 2.0以上版本号)
    WebService 设计总结
    select poll使用
    QQ强制视频聊天
    图解iPhone开发新手教程
  • 原文地址:https://www.cnblogs.com/changxs/p/4045957.html
Copyright © 2011-2022 走看看