Code Monkey home page Code Monkey logo

yqlightlable's Introduction

YQLightLable

微博:畸形滴小男孩

闪光Lable(可模拟iphone解锁效果)

效果预览:

image

-直接拖到工程中使用

#import "YQLightLab.h"

Example Code:

最简单使用(默认效果):

- (void)viewDidLoad {
    [super viewDidLoad];
    //把背景颜色调暗一些便于查看效果。
    self.view.backgroundColor = [UIColor darkGrayColor];

    //像普通Lable一样,创建YQLightLable
    YQLightLable *lab = [[YQLightLable alloc]init];
    lab.frame = CGRectMake(0, 50, self.view.frame.size.width, 25);
    lab.text = @"显示的文字,显示的文字,显示的文字,显示的文字,显示的文字,";

    //像普通Lable一样加载显示
    [self.view addSubview:lab];
}

自定义效果:

	
	//文字颜色
	lab.textColor
	//光束颜色
	lab.lightColor
	//动画时间(控制速度)
	lab.DurationTime
	//光束宽度
	lab.LightWidth
	//动画重复次数(默认最大)
	lab.repeatCount
	//动画方向--向右(默认)
	lab.direction = YQLightLableDirectionToRight;
	//向左
	lab.direction = YQLightLableDirectionToLeft;
	//向上
	lab.direction = YQLightLableDirectionToUp;
	//向下
	lab.direction = YQLightLableDirectionToDown;

UILable常用设置

以下属性,可以直接设置:
	lab.text
	lab.font
	lab.textAlignment
	lab.numberOfLines
	lab.lineBreakMode
	lab.attributedText
	lab.adjustsFontSizeToFitWidth
更多UILable的设置,请访问“.UILable”属性进行设置:
	lab.UILable.enabled ....
  • 说明:建议不要修改 “.UILable.textColor”属性,可能会对效果造成影响。需要更改颜色,请直接更改“.textColor”属性

yqlightlable's People

Contributors

976431yang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.