2015年7月8日

IOS 定时器

摘要: -(void)initTimer{ //时间间隔 NSTimeInterval timeInterval = 1.0 ; //定时器 NSTimer *showTimer = [NSTimer scheduledTimerWithTimeInterval:timeInterval target:se 阅读全文

posted @ 2015-07-08 15:03 大木哥 阅读(286) 评论(0) 推荐(0) 编辑

IOS 播放音频

摘要: -(void) playSound{ NSString *path = [[NSBundle mainBundle] pathForResource:@"in" ofType:@"caf"]; if (path) { //注册声音到系统 AudioServic... 阅读全文

posted @ 2015-07-08 09:47 大木哥 阅读(245) 评论(0) 推荐(0) 编辑

2015年7月6日

IOS 子视图获取父视图的控制器

摘要: UIResponder* nextResponder = [self.view.superview.superview nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { ... 阅读全文

posted @ 2015-07-06 20:19 大木哥 阅读(898) 评论(0) 推荐(0) 编辑

IOS 单例

摘要: +(CoachType *)sharedInstance{ static CoachType *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ ... 阅读全文

posted @ 2015-07-06 17:13 大木哥 阅读(229) 评论(0) 推荐(0) 编辑

OS X EI Capitan 10.11 & xcode 7.0 beta(7A120f) -- cocoapods安装失败

摘要: 1.sudo gem install cocoapods: ERROR:While executing gem ... (Errno:EPERM) Operation not permitted - /usr/bin/pod 1.1 解决尝试一 1.1.1 步骤 自定义GEM_HOME$ mkdir 阅读全文

posted @ 2015-07-06 09:01 大木哥 阅读(516) 评论(0) 推荐(0) 编辑

2015年7月1日

查找并删除视图

摘要: UIWindow *win = [[UIApplication sharedApplication].windows objectAtIndex:0]; for (UIView* uv in win.rootViewController.view.subviews) { if([... 阅读全文

posted @ 2015-07-01 15:59 大木哥 阅读(221) 评论(0) 推荐(0) 编辑

IOS 动画的两种方式

摘要: 方式一:[UIView animateWithDuration:1 animations:^{ //动画的内容 CGRect frame = CGRectMake([UIParam widthScreen]-25, 54, 0, 0); [self setF... 阅读全文

posted @ 2015-07-01 15:49 大木哥 阅读(256) 评论(0) 推荐(0) 编辑

IOS手势

摘要: UITapGestureRecognizer *doubleClick = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(PictureClick:)]; doubleClick.numberOfTaps... 阅读全文

posted @ 2015-07-01 11:25 大木哥 阅读(238) 评论(0) 推荐(0) 编辑

2015年6月24日

日志

摘要: NSLog(@"%@:%@:%d",self.class,NSStringFromSelector(_cmd),__LINE__); NSLog(@"%@",[NSString stringWithFormat:@"%s - Line %d :",__FUNCTION__,__LINE__]);... 阅读全文

posted @ 2015-06-24 13:51 大木哥 阅读(160) 评论(0) 推荐(0) 编辑

2015年6月10日

Core Data需求

摘要: 大家都在讨论怎么使用Core Data,但是什么时候用到Core Data,这好像是大家很少讨论的问题我们使用Core Data ,主要用来存储两种类型的数据:固定的数据,和 可能变化的数据。1.固定不变的数据。例如:性别类型。这种数据基本不会变化,偶尔可能会变。最好预留一个接口。2.可能变化的数据... 阅读全文

posted @ 2015-06-10 17:02 大木哥 阅读(138) 评论(0) 推荐(0) 编辑

导航