//正在滚动 -(void)scrollViewDidScroll:(UIScrollView *)scrollView{ float offset_Y = scrollView.contentOffset.y; NSLog(@"%f",scrollView.contentOffset.y); UI
分类:
移动开发 时间:
2016-01-29 21:02:33
阅读次数:
277
1 for (UIView* subview in self.underView.subviews) { 2 for ( NSLayoutConstraint *constraint in subview.constraints) { 3 NSLog(@"constraint:%@====>%f",
分类:
其他好文 时间:
2016-01-29 11:58:55
阅读次数:
130
NSString不可变字符串,即创建之后不能修改(进行增删改操作)(readonly)只读属性 1.创建一个空的字符串 NSString *string = [[NSString alloc]init]; NSLog(@"%@",string);//注意:不可以对string进行赋值,不可变 2.根
分类:
其他好文 时间:
2016-01-28 00:29:16
阅读次数:
223
NSDate *date = [NSDate date]; NSLog(@"%@", date); NSCalendar *ca = [NSCalendar currentCalendar]; NSDateComponents *res = [ca components:NSCalendarUnit
分类:
其他好文 时间:
2016-01-27 19:30:29
阅读次数:
168
while (loving) { if (separated) { NSLog(@"game is over."); break; } if (separating) { NSLog(@"no no no,You will not leave me"); continue; } NSLog(@"we
分类:
其他好文 时间:
2016-01-27 18:52:49
阅读次数:
143
1 // 如果一个控制是另外一个控件的子控件, 那么这个控件中的layer也是另外一个控件的子layer2 NSLog(@"star - %@", self.view.layer.sublayers);3 CALayer *layer = [CALayer layer];4...
分类:
移动开发 时间:
2016-01-24 00:38:25
阅读次数:
276
1 @implementation NJView 2 3 /* 4 -(void)awakeFromNib 5 { 6 7 NSLog(@"awakeFromNib"); 8 // 创建CADisplayLink, 默认每秒60次 9 CADisplayLink *di...
分类:
移动开发 时间:
2016-01-23 01:10:37
阅读次数:
216
//循环压缩,知道服务器限制,我这边的限制是2MB for (int i = 0; i 2*1000*1000) { img = [LDUnity compressImageWith:img]; NSLog(@"第%d次压缩 === %lu...
分类:
Web程序 时间:
2016-01-22 21:52:48
阅读次数:
1065
1.代码创建json文件,并保存到本地第一步.设置json文件的保存路径NSString *filePath = [NSHomeDirectory() stringByAppendingString:@"/Documents/myJson.json"];NSLog(@"%@",filePath);第...
分类:
移动开发 时间:
2016-01-22 20:59:59
阅读次数:
1195