06 2013 档案

摘要:ELYTAppDelegate.m#import "ELYTAppDelegate.h"@implementation ELYTAppDelegate@synthesize window = _window;- (void)dealloc{ [_window release]; [super dealloc];}- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWind 阅读全文
posted @ 2013-06-07 15:17 jason.android 阅读(161) 评论(0) 推荐(0)
摘要:UserController.h#import @interface UserController : NSObject { int _id;}@property (nonatomic,assign) int _id;- (void) display;+ (id) defaultUserController:(int) _id;@endUserController.m#import "UserController.h"static UserController* singleInstance = nil;@implementation UserController@synt 阅读全文
posted @ 2013-06-07 14:52 jason.android 阅读(140) 评论(0) 推荐(0)
摘要:main.m#import #import "Person.h"int main(int argc, const char * argv[]){ @autoreleasepool { //-----------第1种归档方式--------- //1.使用NSKeyedArchiver 归档对象到文件(对象序列化,持久化) NSArray* arrays = [[NSArray alloc]initWithObjects:@"111",@"222", nil]; NSStrin... 阅读全文
posted @ 2013-06-07 13:55 jason.android 阅读(121) 评论(0) 推荐(0)
摘要:#import int main(int argc, const char * argv[]){ @autoreleasepool { NSMutableArray* arr1 = [[NSMutableArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5", nil]; //使用retain得到对象所有权,arr1的引用计数加1后为2 NSMutableArray* arr2 = [arr1 retain]; NSLog(@"arr 阅读全文
posted @ 2013-06-07 11:59 jason.android 阅读(123) 评论(0) 推荐(0)
摘要:FileTools.h#import //文件工具类@interface FileTools : NSObject//复制文件+ (void) copyFileWithSrcFile:(NSString*) srcFilePath withBakFile:(NSString*) bakFilePath;//获取文件的大小+ (NSNumber*) fileLengthWithFile:(NSString*) filePath;@endFileTools.m#import "FileTools.h"@implementation FileTools//复制文件+ (void) 阅读全文
posted @ 2013-06-06 18:57 jason.android 阅读(212) 评论(0) 推荐(0)
摘要:#import int main(int argc, const char * argv[]){ @autoreleasepool { //基本数据类型变量的定义 int age = 18; float f = 3.15F; double d = 4.53234235; char c = 'A'; //打印基本数据类型变量的值 NSLog(@"age=%d",age); NSLog(@"f=%.4f",f); NSLog(@"d=%... 阅读全文
posted @ 2013-06-05 11:20 jason.android 阅读(163) 评论(0) 推荐(0)