Git Product home page Git Product logo

wsshininglabel's Introduction

WSShiningLabel

闪烁的文字,多种闪烁效果

PhotoShoot

image

How To Use

#import "WSShiningLabel.h"

WSShiningLabel *label1 = [[WSShiningLabel alloc] init];
label1.frame = CGRectMake(50, 35, 200, 25);
label1.text = @"当保护你的她";
label1.textColor = [UIColor grayColor];
label1.font = [UIFont systemFontOfSize:20];
[label1 startShimmer];                 // 开启闪烁
[self.view addSubview:label1];


WSShiningLabel *label2 = [[WSShiningLabel alloc] init];
label2.frame = CGRectMake(50, 105, 200, 25);
label2.text = @"变成要你保护的她";
label2.textColor = [UIColor grayColor];
label2.font = [UIFont systemFontOfSize:20];
label2.shimmerType = ST_RightToLeft;           // 滚动方向 right to left
label2.durationTime = 1;                     // 滚动时间
label2.shimmerColor = [UIColor orangeColor];   // 高亮颜色
[label2 startShimmer];                         // 开启闪烁
[self.view addSubview:label2];


WSShiningLabel *label3 = [[WSShiningLabel alloc] init];
label3.frame = CGRectMake(50, 175, 200, 25);
label3.text = @"当你远离了家";
label3.textColor = [UIColor grayColor];
label3.font = [UIFont systemFontOfSize:20];
label3.shimmerType = ST_AutoReverse;           // 滚动方向 左右来回
label3.shimmerWidth = 20;                      // 高亮的宽度
label3.shimmerRadius = 20;                     // 阴影的宽度
label3.shimmerColor = [UIColor yellowColor];   // 高亮颜色
[label3 startShimmer];                         // 开启闪烁
[self.view addSubview:label3];


WSShiningLabel *label4 = [[WSShiningLabel alloc] init];
label4.frame = CGRectMake(50, 245, 200, 25);
label4.text = @"努力有了你爱的她";
label4.textColor = [UIColor grayColor];
label4.font = [UIFont systemFontOfSize:20];
label4.shimmerType = ST_ShimmerAll;             //  闪烁
label4.durationTime = 0.8;
label4.shimmerColor = [UIColor redColor];
[label4 startShimmer];
[self.view addSubview:label4];


wsshininglabel's People

Contributors

zws-china avatar

Watchers

James Cloos avatar ruanjh 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.