摘要: 上面我们提到我们需要设置字体集,在IOS系统中我们用到的字体包含一下几种 :Font Family: American Typewriter(AmericanTypewriter,AmericanTypewriter-Bold)Font Family: AppleGothic(AppleGothic... 阅读全文
posted @ 2014-04-23 13:15 hellocby 阅读(1765) 评论(0) 推荐(0) 编辑
摘要: UIViewController *controller; UIView *view = self.view; while (1) { controller = (UIViewController *)view.nextResponder; if (![controller isKindOfClass:[UIViewControllerclass]] || controller.navigationController == nil) view = view.superview; else break; } 阅读全文
posted @ 2014-02-20 14:14 hellocby 阅读(6327) 评论(0) 推荐(0) 编辑
摘要: static作用:“改变生命周期” 或者 “改变作用域” 程序的局部变量存在于(堆栈)中,全局变量存在于(静态区 )中,动态申请数据存在于( 堆)中。1.作用于变量: 用static声明局部变量-------局部变量指在代码块{}内部定义的变量,只在代码块内部有效(作用域),其缺省的存储方式是自动变量或说是动态存储的,即指令执行到变量定义处时才给变量分配存储单元,跳出代码块时释放内存单元(生命期)。用static声明局部变量时,则改变变量的存储方式(生命期),使变量成为静态的局部变量,即编译时就为变量分配内存,直到程序退出才释放存储单元。这样,使得该局部变量有记忆功能,可以记忆上次的数据... 阅读全文
posted @ 2014-02-11 10:53 hellocby 阅读(37474) 评论(0) 推荐(4) 编辑
摘要: 1.删除并且屏蔽文件 git rm --cached *.xcuserstate git commit -m "Removed file that shouldn't be tracked"2.删除远程分支 oschina:git push oschina :your_branch_name github:git push origin :your_branch_name3.删除本地分支 git branch -d your_branch_name4.查看分支 git branch -a 阅读全文
posted @ 2013-11-21 10:20 hellocby 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 在我们的iOS程序中,经常会用到多个第三方的开源库,通常做法是去下载最新版本的开源库,然后拖拽到工程中。 但是,第三方开源库的数量一旦比较多,版本的管理就非常的麻烦。有没有什么办法可以简化对第三方库的管理呢?有!在使用SDWebImage这个第三方库的时候,我在学习如何将进度展现时,看到有人提到用CocoaPods(http://cocoapods.org/,需FQ) 来管理第三方开源库。 CocoaPods是管理Objective-c 程序中各种第三方开源库关联非常棒的方式,只要安裝好 CocoaPods,在自己程序的根目录下建立一份 Podfile 文字,在里面说明要使用哪些套件,... 阅读全文
posted @ 2013-11-06 18:38 hellocby 阅读(427) 评论(0) 推荐(0) 编辑
摘要: Expect users to swipe up from the bottom of the screen to reveal Control Center. If iOS determines that a touch that begins at the bottom of the screen should reveal Control Center, it doesn’t deliver the gesture to the currently running app. If iOS determines that the touch should not reveal Contro 阅读全文
posted @ 2013-09-23 17:17 hellocby 阅读(372) 评论(0) 推荐(1) 编辑
摘要: iOS7添加了动态调整文字的大小,app可以通过接受通知的方式进行设置iOS 7 introduces Dynamic Type, which makes it easy to display great-looking text in your app.A message at the smallest sizeA message at the largest non Accessibility sizeWhen you adopt Dynamic Type, you get:Automatic adjustments to letter spacing and line height fo 阅读全文
posted @ 2013-09-23 17:15 hellocby 阅读(1309) 评论(0) 推荐(1) 编辑
摘要: 原文:https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html#//apple_ref/doc/uid/TP40013174-CH14-SW1On This PageUsing Interface Builder to Support Multiple App VersionsSupporting Two Versions of a Standard AppManaging Multiple Images in 阅读全文
posted @ 2013-09-23 17:03 hellocby 阅读(670) 评论(0) 推荐(1) 编辑
摘要: Scoping the ProjectOn This PageThings Every App Must DoThings Every App Should DoIf You Must Continue to Support iOS 6Knowing your app’s compatibility requirements and customization characteristics gives you some idea of the path to take. Use the following checklists to fill in more details and to s 阅读全文
posted @ 2013-09-23 17:01 hellocby 阅读(329) 评论(0) 推荐(1) 编辑
摘要: 1 //C语言实现 2 3 void mergeSort(int array[],int first, int last) 4 { 5 if (first < last)//拆分数列中元素只剩下两个的时候,不再拆分 6 { 7 int mid = (first + last) / 2; 8 //递归拆分数组 9 mergeSort(array, first, mid);10 mergeSort(array, mid + 1, last);11 //归并两个数组12 merge(a... 阅读全文
posted @ 2013-09-17 17:44 hellocby 阅读(256) 评论(0) 推荐(0) 编辑