使用RQShineLabel

https://github.com/zipme/RQShineLabel

最终效果:

源码:

//
// RootViewController.m
// UseTextShine
//
// Copyright (c) 2014年 Y.X. All rights reserved.
// #import "RootViewController.h"
#import "RQShineLabel.h"
#import "FontPool.h" @interface RootViewController () @end @implementation RootViewController - (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor blackColor]; // 注册字体
REGISTER_FONT(bundleFont(@"新蒂小丸子体.ttf"), @"新蒂小丸子体"); // 初始化
RQShineLabel *label = \
[[RQShineLabel alloc] initWithFrame:CGRectMake(, , - ,
CGRectGetHeight(self.view.bounds) - )];
label.numberOfLines = ;
label.textColor = [UIColor cyanColor];
label.backgroundColor = [UIColor clearColor];
label.text = @"床前明月光, 疑是地上霜。 举头望明月, 低头思故乡。";
label.font = [UIFont fontWithName:CUSTOM_FONT(@"新蒂小丸子体", ) size:23.0];
[label sizeToFit];
label.center = self.view.center; // 动画显示
[label shineWithCompletion:^{ // 动画渐渐隐藏
[label fadeOut];
}]; [self.view addSubview:label];
} @end

不过,这个东西是吃内存大户-_-!!!

核心源码,不过看不懂:)

 

使用RQShineLabel的更多相关文章

  1. iOS.OpenSource.AllInOne

    Open Source Project for iOS 所有和iOS相关的Open Source Project的汇总. 功能点 开源项目   iOS Gallery RMGallery https: ...

  2. github上所有大于800 star OC框架

    https://github.com/XCGit/awesome-objc-frameworks#awesome-objc-frameworks awesome-objc-frameworks ID ...

  3. ios 渐进淡出

    在github上寻找的经典demo //以view为继承类 LazyFadeInView-master https://github.com/itouch2/LazyFadeInView //以Lab ...

随机推荐

  1. windows 3389 远程

    3389常用命令: 1.查询终端端口 REG query HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\WinSt ...

  2. MySQL存储引擎 InnoDB与MyISAM的区别

    来源:http://www.jb51.net/article/47597.htm 基本的差别:MyISAM类型不支持事务处理等高级处理,而InnoDB类型支持.MyISAM类型的表强调的是性能,其执行 ...

  3. 配置MySQL接受远程登录连接

    一 开放mysql mysql的配置文件在/etc/mysql/my.cnf文件内,里面有一行bind-address = 127.0.0.1表示只允许本地访问,将这行注释即可 # bind-addr ...

  4. digestmd5.c:4037:15: error: #elif with no expression

    执行如下:sed -i.bak 's/#elif WITH_DES/#elif defined(WITH_DES)/' \ plugins/digestmd5.c

  5. SOAP1.1 and SOAP1.2

    在用cxf 做webservice客户端的时候碰到的: javax.xml.ws.soap.SOAPFaultException: A SOAP 1.2 message is not valid wh ...

  6. 通配符证书导致 Outlook Anywhere 的客户端连接问题

    通配符证书导致 Outlook Anywhere 的客户端连接问题 本主题介绍当您使用 Outlook Anywhere 连接到 Microsoft Exchange 及在组织中跨 Exchange ...

  7. 在ViewDidLoad中往导航栈推ViewController报错

     Unbalanced calls to begin/end appearance transitions for <YZPMainViewController: 0x7fa04b4970f0& ...

  8. [转]SAPUI5 (01) - OpenUI5环境搭建

    本文转自:http://blog.csdn.net/stone0823/article/details/53750094 版权声明:本文为博主原创文章,转载请注明出处:http://blog.csdn ...

  9. Orchard源码:缓存设计

    概述 从缓存失效的几种方式开始了解Orchard缓存设计 1.设置失效时间 Func<int> retrieve = () => _cacheManager.Get("te ...

  10. 为什么会出现__pycache__文件夹?

    为什么会出现__pycache__文件夹? python解释器会将 *.py 脚本文件进行编译,并将编译结果保存到__pycache__目录中. 下次再执行工程时,若解释器发现这个 *.py 脚本没有 ...