摘要: _imageView.frame = CGRectMake(0, 0, width, height);_textLabel.frame = CGRectMake(CGRectGetMaxX(_imageView.frame), 0, CGRectGetWidth(self.frame) - CGRe... 阅读全文
posted @ 2015-07-22 19:21 火星的蝈蝈 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 方法一+ (instancetype)shareManage{ static Manage *manage = nil; if (manage == nil) { manage = [[Manage alloc]init]; } ... 阅读全文
posted @ 2015-07-22 15:15 火星的蝈蝈 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 主要3个类FMDataBase 阅读全文
posted @ 2015-07-20 16:34 火星的蝈蝈 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 在定制部分必须有下面的方法-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ if (self =[super initWithStyle:style reuse... 阅读全文
posted @ 2015-07-16 09:55 火星的蝈蝈 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1、遵守协议2、创建UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc]init]; layout.minimumInteritemSpacing = 10; //最小item之间的间距 layout.mi... 阅读全文
posted @ 2015-07-08 17:54 火星的蝈蝈 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 第一步:添加第三方库,添加框架第二步:创建数据模型并创建实体第三步:#import "CoreData+MagicalRecord.h"//该头文件必须添加到.pch的文件中第四步: //初始化数据库信息,名字根据需要写 [MagicalRecord setupCoreDataStackWithSt... 阅读全文
posted @ 2015-07-06 20:17 火星的蝈蝈 阅读(420) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/kenshincui/p/4077833.html#CoreData数据库中只能储存对象指针,不能存基本类型。不能存自定义对象。coreData可以存自定义对象,不用sql语句模型 类 实体 属性ORM(Object Relational Mapping... 阅读全文
posted @ 2015-07-06 20:01 火星的蝈蝈 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 添加分段控件 转子tx天翔 原文地址控件是一种小型的、自包含的UI组件,可以用在各种UI Kit类中。它们可以被附着在许多不同类型的对象之上,让开发者可以在窗口中添加额外的功能。有一个控件在苹果公司预装的应用程序的导航栏中经常见到,这就是分段控件。你会注意到,在许多预置的应用程序中,苹果公司加入一些... 阅读全文
posted @ 2015-07-06 18:27 火星的蝈蝈 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 学习这个,这一个网页就够了http://www.cnblogs.com/kenshincui/p/3931948.html第一步tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, 320, 480) style:UITabl... 阅读全文
posted @ 2015-07-06 14:03 火星的蝈蝈 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1》通过冒泡排序[dataArray exchangeObjectAtIndex: withObjectAtIndex:]; 阅读全文
posted @ 2015-07-06 10:57 火星的蝈蝈 阅读(147) 评论(0) 推荐(0) 编辑