12 2014 档案

CAGradientLayer 透明渐变注意地方(原创)
摘要:CAGradientLayer *newShadow = [[CAGradientLayer alloc] init]; //添加渐变的颜色组合 newShadow.colors = [NSArray arrayWithObjects: (id)[[[UIColor co... 阅读全文

posted @ 2014-12-24 14:37 Jason_Luo 阅读(454) 评论(0) 推荐(0) 编辑

关于无符号整型和浮点数四舍五入容易引发错误的地方(原创)
摘要:NSMutableArray *ar = [[NSMutableArray alloc]init]; for (int i = 0; i<[ar count]-1; i++) { NSLog(@"test:%d",i); }由于 [ar count] 返回为 无符号类型,[ar coun... 阅读全文

posted @ 2014-12-22 12:07 Jason_Luo 阅读(607) 评论(0) 推荐(0) 编辑

Put checkmark in the left side of UITableViewCell
摘要:link:http://stackoverflow.com/questions/8755506/put-checkmark-in-the-left-side-of-uitableviewcell@"\u2611", @"\u2B1C", @"\u2705", @"\u26AB", @"\u26AA"... 阅读全文

posted @ 2014-12-08 11:16 Jason_Luo 阅读(173) 评论(0) 推荐(0) 编辑

gcd 注意地方 (原创)
摘要:修改block之外的变量默认情况下,在程序块中访问的外部变量是复制过去的,即写操作不对原变量生效。但是你可以加上 __block来让其写操作生效,示例代码如下:123456 __block int a = 0; void (^foo)(void) = ^{ a = 1; } foo();... 阅读全文

posted @ 2014-12-05 16:04 Jason_Luo 阅读(160) 评论(0) 推荐(0) 编辑

GCD API 总结(原创)
摘要:Dispatch Queue即 执行处理的等待队列。存在两种Dispatch Queue,即Serial Dispatch Queue 等待现在的处理(串行队列)Concurrent Dispatch Queue 不等待现在的处理(并发队列)并行处理的数量取决于当前系统的状态,不能像operatio... 阅读全文

posted @ 2014-12-05 10:03 Jason_Luo 阅读(312) 评论(0) 推荐(0) 编辑

CocoaPods安装和使用教程
摘要:Code4App 原创文章。转载请注明出处:http://code4app.com/article/cocoapods-install-usage 最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies... 阅读全文

posted @ 2014-12-03 11:11 Jason_Luo 阅读(212) 评论(0) 推荐(0) 编辑

ios 中生成随机数
摘要:ios 有如下三种随机数方法:1.srand((unsigned)time(0)); //不加这句每次产生的随机数不变int i = rand() % 5;2.srandom(time(0));int i = random() % 5;3.int i = arc4random() % 5 ;注:ra... 阅读全文

posted @ 2014-12-01 14:54 Jason_Luo 阅读(307) 评论(0) 推荐(0) 编辑

view 生命周期
摘要:每个ios开发者对loadView和viewDidLoad肯定都很熟悉,虽然这两个函数使用上真的是非常简单,但是和类似的initWithNibName/awakeFromNib/initWithCoder放在一起还是非常容易让人混淆的.一、loadView永远不要主动调用这个函数。view cont... 阅读全文

posted @ 2014-12-01 11:09 Jason_Luo 阅读(160) 评论(0) 推荐(0) 编辑

关于 XIB 和 NIB
摘要:NIB 和 XIB 的区别与联系NIB 和 XIB 都是 Interface Builder 的图形界面设计文档。引用《Cocoa Programming for Mac OSX》一书的说法,Interface Builder 把窗口、菜单栏以及窗口上的各种控件的对象都“冻结”在了一个 NIB文档里... 阅读全文

posted @ 2014-12-01 10:54 Jason_Luo 阅读(329) 评论(0) 推荐(0) 编辑

iOS6的旋屏控制技巧
摘要:在iOS5.1 和 之前的版本中, 我们通常利用shouldAutorotateToInterfaceOrientation:来单独控制某个UIViewController的旋屏方向支持,比如:- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInt... 阅读全文

posted @ 2014-12-01 10:42 Jason_Luo 阅读(127) 评论(0) 推荐(0) 编辑

图表的重要性:Anscombe的四组数据(anscombe's quartet)
摘要:图表的重要性:Anscombe的四组数据1973年,统计学家F.J. Anscombe构造出了四组奇特的数据。它告诉人们,在分析数据之前,描绘数据所对应的图像有多么的重要。Anscombe’s QuartetIIIIIIIVxyxyxyxy10.08.0410.09.1410.07.468.06.5... 阅读全文

posted @ 2014-12-01 10:35 Jason_Luo 阅读(2053) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示