关于颜色的宏定义 // 根据指定的 RGB 创建 UIColor #define RGB(r, g, b) ([UIColor colorWithRed:(r / 255.0) green:(g / 255.0) blue:(b / 255.0) alpha:1.0]) /// 创建随机颜色 #de
分类:
其他好文 时间:
2016-03-04 10:24:33
阅读次数:
155
<script> function randomColor() { var arr = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; var colo
分类:
其他好文 时间:
2016-01-28 19:18:29
阅读次数:
147
//0-255的随机数#define randint arc4random() % 256//随机色#define randColor [UIColor colorWithRed:randint/255.0 green:randint/255.0 blue:randint/255.0 alpha:1...
分类:
其他好文 时间:
2015-12-15 22:27:42
阅读次数:
159
这两个区别是如果你的字符串是http://www.xxx.com这样就用urlwithstring这个方法把这个字符串转换成url对象如果你的字符串是一个路径描述,比如/user/a/a.txt这样,就用fileurlwithpath转换成url对象定义随机色的宏:#define RandomCol...
分类:
Web程序 时间:
2015-10-14 15:45:53
阅读次数:
245
用碎片加载小方块实现简单的随机色块,直接上代码,如果你嫌麻烦,可以看demo:http://codepen.io/koringz/pen/QbZEwx/**/js注释已删 koringz * { -...
分类:
其他好文 时间:
2015-07-24 17:23:59
阅读次数:
126
#define RGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]#define RGBAColor(r, g, b ,a) [UIColor colorWithRed:(...
分类:
移动开发 时间:
2015-05-14 11:48:55
阅读次数:
813
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <style type="text/css"> *{ ? ? margin:0; ? ? padding:0 } a{? ? ? text-decoration:none } #wrap{ ? ? width:400p...
分类:
其他好文 时间:
2015-03-13 20:54:21
阅读次数:
190
在开发过程中,不管是调bug还是什么,log打印是必不可少的,但是有时候后不想让他打印,就要一个个找log很是繁琐
在布局过程中,特别是代码布局,UI控件设置背景颜色,同样必不可少,但其实这些颜色我们只是为了方便布局,很多时候都是要么删掉,要么注掉,很是麻烦
下面是自己开发过程中必备的一些宏定义,
最常用的文本颜色, UI控件的背景颜色开关,log打印的开关【直接定位到某个文件的某一行】
...
分类:
其他好文 时间:
2015-03-04 13:04:59
阅读次数:
137
网上有个ColorPicker开源项目,选择颜色值。而在这里我想实现的是动态修改一个view的背景色。
开一个线程,每隔1s修改一次view的背景色。
我们知道在android里设置一个view的背景色有
framelayout.setBackgroundColor(Color.parseColor("#"+arg0.obj));就是用android的Color类去解析一个带#号的十六进制色...
分类:
移动开发 时间:
2014-09-21 15:00:20
阅读次数:
282