辉光的UIView
辉光的UIView
辉光UIView使用了一个UIView的一个category,名为UIView+Glow,请自行到github上查找.
源码如下:
//
// RootViewController.m
// GlowView
//
// Copyright (c) 2014年 Y.X. All rights reserved.
// #import "RootViewController.h"
#import "UIView+Glow.h"
#import "FontPool.h" @interface RootViewController () @end @implementation RootViewController - (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor blackColor]; // 注册字体
REGISTER_FONT(bundleFont(@"新蒂小丸子体.ttf"), @"新蒂小丸子体"); // name标签
UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(, , , )];
name.text = @"游贤明";
name.font = [UIFont fontWithName:CUSTOM_FONT(@"新蒂小丸子体", ) size:];
name.textColor = [UIColor redColor];
name.center = self.view.center;
[self.view addSubview:name]; // 字幕标签
UILabel *letters = [[UILabel alloc] initWithFrame:CGRectMake(, , , )];
letters.text = @"No zuo no die";
letters.font = [UIFont fontWithName:CUSTOM_FONT(@"新蒂小丸子体", ) size:];
letters.textColor = [UIColor whiteColor];
[self.view addSubview:letters]; // 开始辉光
[name startGlowingWithColor:[UIColor cyanColor] intensity:1.0f];
[letters startGlowingWithColor:[UIColor yellowColor] intensity:1.0f];
} @end
效果图如下:
效果好哦:)
辉光的UIView的更多相关文章
- 辉光UIView的category
辉光UIView的category 本人视频教程系类 iOS中CALayer的使用 效果如下: 源码: UIView+GlowView.h 与 UIView+GlowView.m // // UI ...
- Shimmer辉光动画效果
Shimmer辉光动画效果 效果 源码 https://github.com/facebook/Shimmer https://github.com/YouXianMing/Animations // ...
- 使用CALayer制作View的辉光效果
使用CALayer制作View的辉光效果 实现以下的辉光效果: 思路是这样子的: 1. 创建好需要实现辉光效果的View 2. 对这个View进行截图 3. 将这个截图重新添加进View中 4. 对这 ...
- 支持辉光效果的Label
支持辉光效果的Label 效果 源码 https://github.com/YouXianMing/UI-Component-Collection 中的 FBGlowLabel // // FBGlo ...
- GraphicsLab Project之辉光(Glare,Glow)效果 【转】
作者:i_dovelemon 日期:2016 / 07 / 02 来源:CSDN 主题:Render to Texture, Post process, Glare, Glow, Multi-pass ...
- RCLighting
RCLighting https://github.com/RidgeCorn/RCLighting 效果: 真机测试的效率: 看了源码,其实原理很简单: ====================== ...
- iOS之UI--辉光动画
前言:学习来自YouXianMing老师的博客:<辉光UIView的category>以及YouXianMing老师的github源码:< GlowView > 而我个人 ...
- iOS-UI-UI控件概述
以下列举一些在开发中可能用得上的UI控件: IBAction和IBOutlet,UIView 1 @interface ViewController : UIViewController 2 3 @p ...
- [控件] GlowView
GlowView 效果 说明 这是本人第二次写辉光view了,这是改进版本 源码 https://github.com/YouXianMing/UI-Component-Collection // / ...
随机推荐
- Ubuntu系统Apache Maven安装
操作系统:Linux x64 / Ubuntu 14.04 Apache Maven版本:3.3.9 建议预先搭建Java开发环境:详见上一篇<Linux Ubuntu系统下Java开发环境搭建 ...
- java多线程--------深入分析 ThreadLocal 内存泄漏问题
前言 ThreadLocal 的作用是提供线程内的局部变量,这种变量在线程的生命周期内起作用,减少同一个线程内多个函数或者组件之间一些公共变量的传递的复杂度.但是如果滥用ThreadLocal,就可能 ...
- 在spring中常被忽视的注解 @Primary
在spring 中使用注解,常使用@Autowired, 默认是根据类型Type来自动注入的. 但有些特殊情况,对同一个接口,可能会有几种不同的实现类,而默认只会采取其中一种的情况下 @Primary ...
- Flex 生成行号
private function formatIndexNumber(item:Object, colum:Object):String { return indexNumLabelFun( ...
- 《Think Python》第16章学习笔记
目录 <Think Python>第16章学习笔记 16.1 Time 16.2 纯函数(Pure functions) 16.3 修改器(Modifiers) 16.4 原型 vs. 方 ...
- C#PrintDocument打印尺寸调整
/// <summary> /// 打印的按钮 /// </summary> /// <param name="sender"></par ...
- firefox并不支持selectSingleNode和selectNodes的解决方法
转自:http://qsrock.iteye.com/blog/209585 function test(){ var perid = document.thisForm.PerID.value; v ...
- g2o error
/home/lzp/slamtest/graduationcode/p3/poseestimation/pose_estimation_3d2d.cpp: In function ‘void bund ...
- java多线程(一)-五种线程创建方式
简单使用示例 Java 提供了三种创建线程的方法: 通过实现 Runnable 接口: 通过继承 Thread 类本身: 通过 Callable 和 Future 创建线程. 还有 定时器 线程池 下 ...
- lumen配置日志daily模式
默认的日志保存模式是single 也就是单文件模式 要想改成每日的daily模式可以在bootstrap/app.php下添加: /* * 配置日志文件为每日 */ $app->configur ...