点标记语法属性和幂等方法(多次调用和一次调用返回的结果相同)使用点标记语法访问,其他的情况使用方括号标记语法。良好的风格:view.backgroundColor = [UIColor orangeColor];[UIApplication sharedApplication].delegate;不...
分类:
其他好文 时间:
2015-07-14 15:17:06
阅读次数:
168
直接上代码: /*
第二题:霓虹灯(跑马灯)
*/ NSArray *colorArray = [[[NSArray alloc] initWithObjects:[UIColor redColor], [UIColor orangeColor], [UIColor yellowColor], [UIColor greenColor], [UIColor cy...
分类:
其他好文 时间:
2015-07-14 11:47:35
阅读次数:
158
直接上代码:/*
UILabel 使用
*/ UILabel *aLable = [[UILabel alloc] initWithFrame:self.window.bounds]; aLable.backgroundColor = [UIColor cyanColor];
//lable的text属性为NSString类型,是用来设置其要展示的文本内...
分类:
其他好文 时间:
2015-07-14 10:05:05
阅读次数:
82
iOS中的UIColor可以使用16进制来选取颜色....
分类:
移动开发 时间:
2015-07-13 22:28:22
阅读次数:
154
步骤一:
为UIImage类添加静态方法:
extension UIImage {
static func imageWithColor(color: UIColor) -> UIImage {
let rect = CGRect(x: 0, y: 0, width: 1, height: 1)
UIGraphicsBegin...
分类:
其他好文 时间:
2015-07-13 20:40:36
阅读次数:
242
点标记语法属性和幂等方法(多次调用和一次调用返回的结果相同)使用点标记语法访问,其他的情况使用方括号标记语法。良好的风格:view.backgroundColor = [UIColor orangeColor];[UIApplication sharedApplication].delegate;不...
分类:
其他好文 时间:
2015-07-11 20:00:30
阅读次数:
217
import UIKit
class ViewController3: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor=UIColor.whiteColo...
分类:
编程语言 时间:
2015-07-10 19:03:59
阅读次数:
342
1.ViewController
- (void)viewDidLoad {
[super
viewDidLoad];
self.view.backgroundColor = [UIColor
greenColor];
self.view.alpha =
0.4;
NSString *link =
@"Apple";
...
分类:
其他好文 时间:
2015-07-10 09:38:29
阅读次数:
114
#define?FUIColorFromRGB(rgbValue)?[UIColor?colorWithRed:((float)((rgbValue?&?0xFF0000)?>>?16))/255.0?green:((float)((rgbValue?&?0xFF00)?>>?8))/255.0?blue:((float)(rgbValue?&?0...
分类:
移动开发 时间:
2015-07-09 21:34:16
阅读次数:
216
给UILabel添加背景图片:
self.accountLabel = [[UILabel
alloc]initWithFrame:CGRectMake(kXW(accountBtn),
kY(accountBtn), 250,
32)];
self.accountLabel.backgroundColor = [UIColor
colorWithPatternImage:[...
分类:
其他好文 时间:
2015-07-09 18:08:22
阅读次数:
125