delegate

导航

 

2015年5月9日

摘要: #import #import "FMDatabase.h" @interface RootViewController : UIViewController { //FMDatabase作用为操作数据库:创建数据库,创建数据库中的表 //的增删改查等功能 FMDatabase *_dataBase; //创建数据源数组 NSMutableAr... 阅读全文
posted @ 2015-05-09 18:26 jsonUserList 阅读(167) 评论(0) 推荐(0) 编辑
 
摘要: #import @interface LYMAppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; //增删改查等功能通过managedObjectContext操作 @property (readonly, strong, nonatomic) NSManagedObject... 阅读全文
posted @ 2015-05-09 18:24 jsonUserList 阅读(188) 评论(0) 推荐(0) 编辑
 
摘要: #import #import @interface RootViewController : UIViewController { //声明音乐播放器 AVAudioPlayer *_audioPlayer; } - (IBAction)pressStart:(id)sender; - (IBAction)pressStop:(id)sender; - (IBAction)... 阅读全文
posted @ 2015-05-09 18:19 jsonUserList 阅读(172) 评论(0) 推荐(0) 编辑
 
摘要: #import //iOS中有三种实现多线程的方式 //1,NSThread //2,NSOperationQueue //3,GCD (grand centeral dispatch) //多线程的作用为,一款软件能够在同一时段运行多个任务 //应用程序已建立系统就给他分配一个主线程,控制手机页面 //多线程可以解决页面假死的问题 @interface LYMAppDelegate :... 阅读全文
posted @ 2015-05-09 18:11 jsonUserList 阅读(116) 评论(0) 推荐(0) 编辑
 

2015年5月6日

摘要: //1 声明block//2 实现block//3 调用block//声明函数指针//void (*ptest1) (void)//声明block,要指向匿名函数void (^block1)(void);int (^block2)(int a,int b);int (^block3)(int a,i... 阅读全文
posted @ 2015-05-06 17:37 jsonUserList 阅读(210) 评论(0) 推荐(0) 编辑
 
摘要: #import #import "DataManagerProtocol.h"@interface DataManager : NSObject{ //加载网络数据 NSURLConnection *_connection; //存储网络数据 NSMutableDat... 阅读全文
posted @ 2015-05-06 16:56 jsonUserList 阅读(130) 评论(0) 推荐(0) 编辑
 
摘要: #import @interface Student : NSObject@property(retain,nonatomic)NSString *name;@property(assign,nonatomic)int age;//设计单利模式//+(类名*)shareXXX// de... 阅读全文
posted @ 2015-05-06 14:53 jsonUserList 阅读(229) 评论(0) 推荐(0) 编辑
 

2015年4月29日

摘要: 使用ASIHttpRequest第三库,需要配置二,上传数据功能使用ASIFromDataRequest(可以上传二进制和字符串给服务器)下面来牛刀小试//建立一个工程,导入第三方库,在AppDelegate.h#import #import "ASIFormDataRequest.h"@inter... 阅读全文
posted @ 2015-04-29 19:05 jsonUserList 阅读(385) 评论(0) 推荐(0) 编辑
 
摘要: 1 //仅仅声明属性的类,称为实体类(模型类)2 //Student.h中声明属性3 @property(strong,nonatomic)NSString *name;4 @property(assign,nonatomic)int age;5 @property(strong,nonatomic... 阅读全文
posted @ 2015-04-29 17:43 jsonUserList 阅读(316) 评论(0) 推荐(0) 编辑
 
摘要: 1 //KVC(Key Value Coding) 2 //KVC的作用给某个对象的属性赋值,和点语法中的赋值的作用相同 3 Student *stu=[[Student alloc]init]; 4 [stu setValue:@"xiaowang" forKey:@"name"]; 5 NSL... 阅读全文
posted @ 2015-04-29 17:03 jsonUserList 阅读(216) 评论(0) 推荐(0) 编辑