zoukankan      html  css  js  c++  java
  • iOS 渐变提示。Labe自动换行

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

        noticeLabel.text = @"当前账号已失效果,已清除当前账号已失效果,已清除当前账号已失效果,已清除当前账号已失效果,已清除当前账号已失效果,已清除当前账号已失效果,已清除";

        noticeLabel.frame = CGRectMake(0, 400, 300, 60);

        noticeLabel.textColor = [UIColor whiteColor];

        [self.view addSubview:noticeLabel];

        noticeLabel.backgroundColor = [UIColor grayColor];

        

        noticeLabel.numberOfLines = 0;//表示label可以多行显示

        noticeLabel.lineBreakMode = NSLineBreakByClipping;

        CGSize size = [noticeLabel sizeThatFits:CGSizeMake(noticeLabel.frame.size.width, MAXFLOAT)];

        noticeLabel.frame =CGRectMake(10, 400, 300, size.height);

        

        

        [UIView beginAnimations:nil context:nil];

        [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];

        [UIView setAnimationDuration:4.0];

        [UIView setAnimationDelegate:self];

        noticeLabel.alpha = 0.0;

        [UIView commitAnimations];

  • 相关阅读:
    Codeforces 912E
    Codeforces 912D
    洛谷P4980 【模板】Polya定理
    51nod1222最小公倍数计数
    15 Puzzle LightOJ
    loj2734「JOISC 2016 Day 2」女装大佬 || 洛谷P3615 如厕计划
    Jongmah Codeforces
    洛谷P4238【模板】多项式求逆
    洛谷P4721 【模板】分治 FFT
    FFT,NTT
  • 原文地址:https://www.cnblogs.com/qingjoin/p/6022811.html
Copyright © 2011-2022 走看看