博客统计
摘要: 苹果在Xcode6中弃用了segue的push和model。被show和present取代。 下面是新版本中每种类型的使用总结和例子。建议自己使用前先在测试项目中自己试一试Show根据当前屏幕中的内容,在master area或者detail area中展示内容。例如:如果app当前同时显示... 阅读全文
posted @ 2015-10-27 10:21 coderCD 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1.KYAnimatedPageControl 链接:KYAnimatedPageControl KYAnimatedPageControl不仅可以在你滑动UIScrollView的时候自动以动画的形式移动,而且你还可以直接在KYAnimatedPageControl上的... 阅读全文
posted @ 2015-09-16 17:56 coderCD 阅读(2190) 评论(2) 推荐(7) 编辑
摘要: 单例在iOS日常开发中是一个很常用的模式。对于希望在 app 的生命周期中只应该存在一个的对象,保证对象的唯一性的时候,一般都会使用单例来实现功能。在OC单例的写法如下:@implementation Singleton+ (id)sharedInstance { static Singl... 阅读全文
posted @ 2015-09-16 09:18 coderCD 阅读(2344) 评论(0) 推荐(1) 编辑
摘要: 作为iOS开发最常用的两个多视图控制器 NavigationController 和 TabBarController 已经很强大了,基本上在大部分的应用中都能看到它们的影子。但是在使用的过程中,系统自带的空间也经常不能满足我们的需求,所以经常需要使用自定义来实现功能。之前写过自定义Naviga... 阅读全文
posted @ 2015-09-15 15:25 coderCD 阅读(8337) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - Core Data stack/** * @synthesize 关联成员变量和属性 */@synthesize managedObjectContext = _managedObjectContext;/** * */@synthesize managedObjec... 阅读全文
posted @ 2015-09-15 15:22 coderCD 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 一、什么是SQLite SQLite是一款轻型的嵌入式数据库,它占用资源非常的低,处理速度快,非常适合用于移动端开发。二、使用 创建DataBaseHandle.h & DataBaseHandle.m DataBaseHandle.h#import #import "Student.h"... 阅读全文
posted @ 2015-09-15 14:47 coderCD 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 一、什么是数据持久化数据持久化及数据的永久存储,将数据保存在硬盘中,程序关闭,内存释放后,重新打开程序,可以继续访问之前保存的数据。二、数据持久化方式常见的数据持久化方式有以下几项:沙盒preference归档 / 反归档SQLiteCoreData这篇只讲沙盒,preference,归档/反归档。... 阅读全文
posted @ 2015-09-12 16:46 coderCD 阅读(2865) 评论(0) 推荐(2) 编辑
摘要: 日常开发中少不了用到UINavigationController,但是很多情况都要自定义NavigationBar。依稀记得自己刚开始也踩了好多坑,凑今天有空,就把想到的写下来。有时间了,考虑再把自定义TabBar写一下。1.修改Navigationbar navigationBar其实有三个子视图... 阅读全文
posted @ 2015-09-11 19:01 coderCD 阅读(3972) 评论(0) 推荐(0) 编辑
摘要: 写了很长的NavigationController介绍,结果被cnblog吞了,没存档,算了,简单粗暴,直接上如何使用。 1.创建3个Controller,继承自UIViewController在AppDelegate.h中//// AppDelegate.m// UINavigationCo... 阅读全文
posted @ 2015-09-11 16:33 coderCD 阅读(390) 评论(0) 推荐(0) 编辑
摘要: UILabel 多行文字自动换行 (自动折行)1.UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(10, 100, 300, 180)]; 2. UILabel *label = [[UILabel alloc] ... 阅读全文
posted @ 2015-07-01 10:02 coderCD 阅读(184) 评论(0) 推荐(0) 编辑