上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页
摘要: 在 GCD 中,加入了两个非常重要的概念:任务和队列。任务:即操作,你想要干什么,说白了就是一段代码,在 GCD 中就是一个 Block,所以添加任务十分方便。任务有两种执行方式: 同步执行 和 异步执行,他们之间的区别是 是否会创建新的线程。同步执行:只要是同步执行的任务,都会在当前线程执行,不会... 阅读全文
posted @ 2015-08-03 15:12 小毛驴 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1. 将开源项目的.xcodeproj拖入项目frameworks2. Build Phases下 Links Binary With Libraries 引入.a文件。Target Dependencies里引入开源项目文件3. Build Setting下的 Search Paths 里 Hea... 阅读全文
posted @ 2015-08-03 10:28 小毛驴 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 用户点击页面控件,会触发UIControlEventValueChanged事件,并启动设置为控件动作的任何方法。可以通过调用currentPage查询控件的新值,并通过调整numberOfPages属性设置可用的页面数。//初始化页面控件pageControl.numberOfPages =9;p... 阅读全文
posted @ 2015-08-02 21:54 小毛驴 阅读(513) 评论(0) 推荐(0) 编辑
摘要: #import @interface UIFont (APCAppearance)+ (UIFont*) appRegularFontWithSize: (CGFloat) size;+ (UIFont*) appMediumFontWithSize: (CGFloat) size;+ (UIFon... 阅读全文
posted @ 2015-08-01 06:23 小毛驴 阅读(192) 评论(0) 推荐(0) 编辑
摘要: case HKBiologicalSexOther: string = @"HKBiologicalSexOther";https://developer.apple.com/library/ios/samplecode/Fit/Introduction/Intro.htmlhttps://deve... 阅读全文
posted @ 2015-07-30 12:35 小毛驴 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 这是因为Xcode6中的模拟器键盘设置跟之前的版本不一样了。之前版本是模拟器的键盘和电脑的键盘都可以使用,但是Xcode6的模拟器键盘只能使用一种,即要么是模拟器键盘,要么是电脑键盘。快捷键切换键盘类型: Shift + Command + K。坑死了啊。各种改代码啊。xcode5 的那种设置,在x... 阅读全文
posted @ 2015-07-29 21:37 小毛驴 阅读(152) 评论(0) 推荐(0) 编辑
摘要: http://mobile.51cto.com/hot-410417.htm退回输入键盘:-(BOOL)textFieldShouldReturn:(id)textField{[textFieldresignFirstResponder];}CGRectCGPoint & CGSizeCGPoint... 阅读全文
posted @ 2015-07-29 17:19 小毛驴 阅读(254) 评论(0) 推荐(0) 编辑
摘要: -(void)shakeView:(UIView*)viewToShake{ CGFloat t =2.0; CGAffineTransform translateRight =CGAffineTransformTranslate(CGAffineTransformIdentity, t,0.0... 阅读全文
posted @ 2015-07-28 22:51 小毛驴 阅读(345) 评论(0) 推荐(0) 编辑
摘要: GCD (Grand Central Dispatch) 是Apple公司开发的一种技术,它旨在优化多核环境中的并发操作并取代传统多线程的编程模式。 在Mac OS X 10.6和IOS 4.0之后开始支持GCD。使用GCD的一个理由就是方便。回想一下以前的多线程编程,我们会把异步调用的代码放到另外... 阅读全文
posted @ 2015-07-26 22:19 小毛驴 阅读(481) 评论(0) 推荐(0) 编辑
摘要: NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES);//使用C函数NSSearchPathForDirectoriesInDomains来获得沙... 阅读全文
posted @ 2015-07-26 19:50 小毛驴 阅读(183) 评论(0) 推荐(0) 编辑
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页