04 2016 档案

摘要:创建数据库语句 -(void)creatData { sqlite3 *sqlite = nil; NSString *filePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/data.file" ]; //打 阅读全文
posted @ 2016-04-09 11:14 meixianLYD 阅读(605) 评论(0) 推荐(0) 编辑
摘要:strong,weak, retain, assign的区别 strong与weak是由ARC新引入的对象变量属性 xcode 4.2(ios sdk4.3和以下版本)和之前的版本使用的是retain和assign,是不支持ARC的。xcode 4.3(ios5和以上版本)之后就有了ARC,并且开始 阅读全文
posted @ 2016-04-09 11:11 meixianLYD 阅读(300) 评论(0) 推荐(0) 编辑
摘要:CGContextRef CGContextMoveToPoint(context,150,50);//圆弧的起始点 CGContextAddArcToPoint(context,100,80,130,150,50); 是说从(150,50)到(100,80)画一条线,然后再从(100,80)到(1 阅读全文
posted @ 2016-04-09 11:10 meixianLYD 阅读(584) 评论(0) 推荐(0) 编辑
摘要:CATransition 的简单用法 //引进CATransition 时要添加包“QuartzCore.framework”,然后引进“#import <QuartzCore/QuartzCore.h>” CATransition *animation = [CATransition animat 阅读全文
posted @ 2016-04-09 11:08 meixianLYD 阅读(2355) 评论(0) 推荐(0) 编辑
摘要:设置评价星星 字体的大小适合布局的大小 [Lable名 sizeToFit]; .h typedef enum kRatingViewStyle { kSmallStyle = 0, kNormalStyle = 1 }kRatingViewStyle; @interface RatingView 阅读全文
posted @ 2016-04-09 11:06 meixianLYD 阅读(194) 评论(0) 推荐(0) 编辑
摘要:开源库:ASIHttpRequest ASIHttpRequest 下载网址:http://github.com/pokeb/asi-http-request 依赖的5个库文件:CFNetwork, SystemConfiguration,MobileCoreServices,和libz , lib 阅读全文
posted @ 2016-04-09 10:58 meixianLYD 阅读(190) 评论(0) 推荐(0) 编辑
摘要:SQLite 的官网 http://addons.mozillan.org/firefox/addon/sqlite-manager/ http://www.sqlite.org sqlite3 *sqlite = nil; NSString *filePath = [NSHomeDirectory 阅读全文
posted @ 2016-04-09 10:57 meixianLYD 阅读(103) 评论(0) 推荐(0) 编辑
摘要:Main 程序的入口要做哪些事: 1.从主类中实例化程序(UIApplication)对象 2.如果有委托的话,从给定的类实例化委托和设置程序(UIApplication) 的代理。 3.开启主事件的循环,包括应用程序(UIApplication) 的运行循环,开始处理事件,让那个程序一直跑起来。 阅读全文
posted @ 2016-04-09 10:52 meixianLYD 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Block 使用的注意点 block 一般用来传值的时候才调用 代理:一般用来封装控件的时候调用,这样有利于扩展 1.用Block 可以做通知的,什么时候需要的时候就什么时候调用。分为无返回值和有返回值两种。 2.block传值的时候,不需要返回值,定义Block 的变量的时候一定要使用(Stron 阅读全文
posted @ 2016-04-09 10:50 meixianLYD 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Fouandation 中常见的理解错误区 1.NSString //快速创建(实例和类方法) 存放的地址是 常量区 NSString * string1 = [NSString alloc]initWithString:@“123”]; NSString * string3 = [NSString 阅读全文
posted @ 2016-04-09 10:31 meixianLYD 阅读(224) 评论(0) 推荐(0) 编辑
摘要:Formatter译为格式,相应的NSDateFormatter就相当于是NSDate的转换类,将NSDate转换为另一种格式,或转换回来。NSDate没有自己的输出,需要借助NSDateFormatter以相应格式输出。这差不多就是NSDateFormatter的作用了吧。 常用的方法并不复杂,几 阅读全文
posted @ 2016-04-09 10:29 meixianLYD 阅读(405) 评论(0) 推荐(0) 编辑
摘要:深浅复制的的理解与区别 1.浅复制,仅仅是复制对象本身,并没有对所含的的对象进行复制,仅仅是对所含的对象进行Retain一下,引用计数加1 2.深复制,不仅仅对对对象本身进行复制,还对所含的对象进行复制,拷贝出一个副本。 NSMutableArray *array = [NSMutableArray 阅读全文
posted @ 2016-04-09 10:25 meixianLYD 阅读(184) 评论(0) 推荐(0) 编辑
摘要:数据的归档和解归档 //归档 BOOL success = [NSKeyedArchiver archiverRootObject:归档的对象 toFile:文件路径]; //解档 id content = [NSKeyedUnArchiver unarchiveObjectWithFile:文件路 阅读全文
posted @ 2016-04-09 10:24 meixianLYD 阅读(147) 评论(0) 推荐(0) 编辑
摘要:谓词 更加详细:http://blog.csdn.net/ztp800201/article/details/8116081 //判断是否满足条件 第一种 判断一个数组(array)中满足条件的 NSPredicate *predicate = [NSPredicate predicateWithF 阅读全文
posted @ 2016-04-09 10:18 meixianLYD 阅读(186) 评论(0) 推荐(0) 编辑
摘要:kvc(键-值编码) { NSString *_name; Author *_author; NSArray *_kvcArray; float price;} //kvc,setValue 的设的值是 “要设置的值” forKey 设置的是对象的属性,如果不是的话要将其转化对象(int folat 阅读全文
posted @ 2016-04-09 10:18 meixianLYD 阅读(140) 评论(0) 推荐(0) 编辑
摘要:KVO(键值观察者) //监听的创建 -(id)initChildren:(Person *)person { self = [super init]; if (self != nil) { //拥有所有权,防止被自动释放 // _person = [person retain]; self.per 阅读全文
posted @ 2016-04-09 10:09 meixianLYD 阅读(141) 评论(0) 推荐(0) 编辑
摘要:框架的使用 1.AFNetworking :是用来请求网络的 AFHTTPRequestOperationManager *mangr = [AFHTTPRequestOperationManager manager]; NSMutableDictionary *paramas = [NSMutab 阅读全文
posted @ 2016-04-09 10:08 meixianLYD 阅读(335) 评论(0) 推荐(0) 编辑
摘要:微博中我学会的东西: 1.项目环境的搭建(推送,版本号,支持的iOS几版本几以上的,用与不用StoryBoard两种建立方式,APPIcon,启动图片的两种方式,还有项目类的前缀) 1.1 创建窗口: //创建窗口 //不能使用局部变量(UIWindow *window) self.window = 阅读全文
posted @ 2016-04-09 10:08 meixianLYD 阅读(175) 评论(0) 推荐(0) 编辑
摘要:微博笔记: 1.LaunchScreen /* *LaunchScreen:替代以前的启动图片 *好处: *1.可以展示更多的内容 *2.仅仅需要一张大尺寸的图片就好,然后伸缩适应图片 * *启动的优先级: *启动图片的优先级低于 < LaunchScreen (图片不适合时记得调一下伸缩) * * 阅读全文
posted @ 2016-04-09 10:07 meixianLYD 阅读(399) 评论(0) 推荐(1) 编辑
摘要:—在地图的定位中遇到 的问题(1.http://blog.csdn.net/m372897500/article/details/50770927 2.http://www.jianshu.com/p/217f041eeb24 3.大众点评是开放API 的,做团购可以去查阅Api ) ******* 阅读全文
posted @ 2016-04-09 10:05 meixianLYD 阅读(464) 评论(0) 推荐(0) 编辑
摘要:百度地图遇到问题的解决方式 1. 以下最新版的百度地图SDK2.9.0遇到的编译错误,应该是因为XCode默认使用的C++标准库是苹果自己的libc++(LLVM C++ standard library with c++11 support),而百度地图SDK中使用的C++标准库是GNU C++的 阅读全文
posted @ 2016-04-09 10:04 meixianLYD 阅读(327) 评论(0) 推荐(0) 编辑
摘要:应用程序间跳转的应用场景 应用间的跳转: 1.//url :统一资源占位符 http://baidu.com tel://110 file:///apple/storebock //由 协议头:http:// tel:// file:// // 资源路径:baidu.com 2.如何配置应用程序的U 阅读全文
posted @ 2016-04-09 09:59 meixianLYD 阅读(411) 评论(0) 推荐(0) 编辑
摘要:读取和写入 文件 //传递文件路径方法 -(id)initPath:(NSString *)srcPath targetPath:(NSString *)targetPath { self = [super init]; if (self != nil) { _srcPath = [srcPath 阅读全文
posted @ 2016-04-09 09:58 meixianLYD 阅读(171) 评论(0) 推荐(0) 编辑
摘要:旋转轮子 *activityView = [[UIActivityIndicatorView alloc ]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; activityView.center= CGPointM 阅读全文
posted @ 2016-04-09 09:47 meixianLYD 阅读(125) 评论(0) 推荐(0) 编辑
摘要:UIAlertView 提示用户 帮助用户选择框 // UIAlertView *alterView = [[UIAlertView alloc] initWithTitle:@"警告" message:@"你还没把信息填完" delegate:nil cancelButtonTitle:@"can 阅读全文
posted @ 2016-04-09 09:44 meixianLYD 阅读(143) 评论(0) 推荐(0) 编辑
摘要:两种设置背景图片方法 // UIView *navigationbarTitleTupian =[[UIView alloc]initWithFrame:CGRectMake(0, 0, 40, 30)]; // UIImageView *imageTitleTupian =[[UIImageVie 阅读全文
posted @ 2016-04-09 09:36 meixianLYD 阅读(269) 评论(0) 推荐(0) 编辑
摘要:关于UIView的userInteractionEnabled属性 如果父视图为ParentView包含一个Button,如果再ParentView上添加子视图ChildView,且ChildView盖住了Button,那么Button就得到不响应了,为了让Button响应,可以设置ChildVie 阅读全文
posted @ 2016-04-09 09:33 meixianLYD 阅读(123) 评论(0) 推荐(0) 编辑
摘要:表示图中Cell默认是不透明的,那么在设置表示图的背景颜色和图片时通常是看不到的 1.给tableView设置背景view UIImageView *backImageView=[[UIImageViewalloc]initWithFrame:self.view.bounds]; [backImag 阅读全文
posted @ 2016-04-09 09:31 meixianLYD 阅读(790) 评论(0) 推荐(0) 编辑
摘要:创建数组规定每组个数 NSArray *array = [UIFont familyNames]; _fontArray = [[NSMutableArray alloc]initWithCapacity:13]; NSMutableArray *temp = nil; for (int index 阅读全文
posted @ 2016-04-09 09:28 meixianLYD 阅读(143) 评论(0) 推荐(0) 编辑
摘要:IOS—UITextFiled控件详解 //初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, 30)]; //设置边框样式,只有设置了才会显示边框样式 阅读全文
posted @ 2016-04-09 09:26 meixianLYD 阅读(1718) 评论(0) 推荐(0) 编辑
摘要:IOS关于UIViewController之间的切换 1.NavigationController切换UIViewController的两种方式 方法一右侧进入 1 SecondViewController* svc=[[SecondViewController alloc]init]; 2 [se 阅读全文
posted @ 2016-04-09 09:17 meixianLYD 阅读(292) 评论(0) 推荐(0) 编辑
摘要:.retain 与copy区别 retain 的仅仅是引用计数加1,但是并没有创建新的对象。它们的指针是指向相同的内存地址。 copy 是创建一个新的对象作为原来对象的副本,新创建出来的引用计数并没有加1。 copy 有两中协议 第一种NSCopying 与NSMutableCopying 一种是可 阅读全文
posted @ 2016-04-09 09:15 meixianLYD 阅读(304) 评论(0) 推荐(0) 编辑
摘要:单例 单例模式的意思就是只有一个实例。单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。 一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例 单例模式的优点: 1.实例控制:Singleton 会阻止其他对象实例化其自 阅读全文
posted @ 2016-04-09 09:10 meixianLYD 阅读(794) 评论(0) 推荐(0) 编辑
摘要:数据的序列化,持久化,归档 1.Foundation 2.数据属性列表(NSArray,NSDictionary) 3.sqlite,cocodata 归档后文件的数据会自动加密,不再是明文,局限性在于,只能对一个对象进行归档 /**归档,数据持久化,数据序列化**/ /* NSString *fi 阅读全文
posted @ 2016-04-09 09:09 meixianLYD 阅读(176) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示