摘要: 对于iPhone app,UIViewController类提供了基本的视图管理模式。当设备改变方向的时候view controller的视图会自动随之旋转的。如果视图和子视图的autoresizing属性设置是对的,这时候视图又没有随着设备一起旋转,可能是以下的原因:1.view controll... 阅读全文
posted @ 2015-10-10 18:16 上官元空 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 设置成NO表示当前控件响应后会传播到其他控件上,默认为YES。 tapGestureRecognizer.cancelsTouchesInView = NO; 阅读全文
posted @ 2015-10-10 18:16 上官元空 阅读(133) 评论(0) 推荐(0) 编辑
摘要: UIInterfaceOrientationUnknown = UIDeviceOrientationUnknown, 界面取向未知 UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, 正常的肖像模式 就是向上 UIInterf... 阅读全文
posted @ 2015-10-10 18:15 上官元空 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1. 上传自己新建的文件新建的类文件 后面的 会有A标示要先 Add To Working copy 再点击提交2. 上传第三方库时 默认SVN是忽略.a文件的要找到.a文件把他设置成不是忽略的通过(commond + shift + i) 组合键 把.a 设置成不是忽略的 。然后右键 点击Add ... 阅读全文
posted @ 2015-10-10 18:14 上官元空 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 'A'新增'D'删除'M'修改'R'替代'C'冲突'I'忽略'?'未受控'!'丢失,一般是将受控文件直接删除导致 阅读全文
posted @ 2015-10-10 18:13 上官元空 阅读(131) 评论(0) 推荐(0) 编辑
摘要: /*预定义字符属性的文本。如果钥匙不在字典,然后使用默认值,如下所述。 */以下属性是IOS6的NSVerticalGlyphFormAttributeName NS_AVAILABLE_IOS(6_0); 一个NSNumber包含一个整数的值。0表示水平文本。1表示垂直文本。如果没有指定,它可以按... 阅读全文
posted @ 2015-10-10 18:12 上官元空 阅读(171) 评论(0) 推荐(0) 编辑
摘要: command+3 command+4 阅读全文
posted @ 2015-10-10 18:12 上官元空 阅读(101) 评论(0) 推荐(0) 编辑
摘要: NSArray *doc = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [doc[0] stringByAppendingPathComponen... 阅读全文
posted @ 2015-10-10 18:12 上官元空 阅读(143) 评论(0) 推荐(0) 编辑
摘要: -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self.view... 阅读全文
posted @ 2015-10-10 18:11 上官元空 阅读(390) 评论(0) 推荐(0) 编辑
摘要: SDWebImage中的一些参数:*SDWebImageRetryFailed = 1<< 0, 默认选项,失败后重试*SDWebImageLowPriority = 1<< 1, 使用低优先级*SDWebImageCacheMemoryOnly = 1<< 2, 仅仅使用内存缓存*SDWebIm... 阅读全文
posted @ 2015-10-10 18:11 上官元空 阅读(155) 评论(0) 推荐(0) 编辑
摘要: //解决scrollView上面的 tableView 滑动冲突 设置一下连个属性 来个控件的滑动事件就不会冲突了[scr setDelaysContentTouches:NO]; [scr setCanCancelContentTouches:NO];//根据indexPath 来获取cellUI... 阅读全文
posted @ 2015-10-10 18:10 上官元空 阅读(170) 评论(0) 推荐(0) 编辑
摘要: [self.navigationController.navigationBar setBackgroundColor:[UIColor colorWithPatternImage:kHelper_Image(@"titlebar")]]; [self.navigationController.na... 阅读全文
posted @ 2015-10-10 18:09 上官元空 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 向字典2对象中添加整个字典对象3[dic2 addEntriesFromDictionary:dic3]; /*----------创建字典----------------------*/ - (id) initWithObjectsAndKeys; NSDictionary *dict... 阅读全文
posted @ 2015-10-10 18:08 上官元空 阅读(326) 评论(0) 推荐(0) 编辑
摘要: - (unsigned) Count;数组所包含对象个数; NSLog(@"self.dataArray cound:%d",[self.dataArray count]); - (id) objectAtIndex: (unsigned int) index;获取指定索引处的对象; NSLo... 阅读全文
posted @ 2015-10-10 18:07 上官元空 阅读(154) 评论(0) 推荐(0) 编辑
摘要: NSString *Path = @"~/NSData.txt"; NSLog(@"Extension:%@",[Path pathExtension]); 阅读全文
posted @ 2015-10-10 18:05 上官元空 阅读(122) 评论(0) 推荐(0) 编辑
摘要: string的操作应用NSRange range = [self.general rangeOfString:@"."];NSString *str = [self.general substringToIndex:range.location];NSRange range1 = [str rang... 阅读全文
posted @ 2015-10-10 18:04 上官元空 阅读(158) 评论(0) 推荐(0) 编辑
摘要: NSString *Path = @"~/NSData.txt"; NSString *absolutePath = [Path stringByExpandingTildeInPath]; NSLog(@"absolutePath:%@",absolutePath); NSLog(@"Pat... 阅读全文
posted @ 2015-10-10 18:04 上官元空 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 创建一个时间格式化对象 NSDateFormatter *datef = [[NSDateFormatter alloc] init]; 设定时间的格式 [datef setDateFormat:@"yyyy-MM-dd"]; 将字符串转换为时间对象NSDate *tempDate = [datef... 阅读全文
posted @ 2015-10-10 18:03 上官元空 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 父视图产生缩放效果的代码[UIView beginAnimations:nil context:nil]; self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity,0.8,0.8); self.view.cente... 阅读全文
posted @ 2015-10-10 18:03 上官元空 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文
1 CGContextMoveToPoint 开始画线
2 CGContextAddLineToPoint 画直线 3 CGContextAddEllipseInRect 画一... 阅读全文
posted @ 2015-10-10 18:01 上官元空 阅读(169) 评论(0) 推荐(0) 编辑