摘要:
//// CCNSLocale.h// CCFC//// Created by xichen on 11-12-27.// Copyright 2011 ccteam. All rights reserved.//#import <Foundation/Foundation.h>@interface NSLocale(cc)+ (NSString *)localeLanguageCode;+ (NSString *)localeCountryCode;@end可能有更新:googlecode链接地址:http://code.google.com/p/iphone-common-co 阅读全文
摘要:
//// CCNSEnumerator.m// CCFC//// Created by xichen on 11-12-27.// Copyright 2011 ccteam. All rights reserved.//#import "CCNSEnumerator.h"@implementation NSEnumerator(cc)- (void)enumForSelector:(id)delegate selector:(SEL)selector{ id obj; while (obj = [self nextObject]) { ... 阅读全文
摘要:
//// CCNSEnumerator.h// CCFC//// Created by xichen on 11-12-27.// Copyright 2011 ccteam. All rights reserved.//#import <Foundation/Foundation.h>@interface NSEnumerator(cc)- (void)enumForSelector:(id)delegate selector:(SEL)selector;- (void)enumForSelector:(id)delegate selector:(SEL)selector use 阅读全文
摘要:
//// CCNSDate.m// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import "CCNSDate.h"@implementation NSDate(cc)// 获取系统时间(yyyy-MM-dd HH:mm:ss.SSS格式)+ (NSString *)getSystemTimeStr{ NSDateFormatter *dateFormatter = [NSDateFormatter new]; [dateF... 阅读全文
摘要:
//// CCNSDate.h// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import <Foundation/Foundation.h>@interface NSDate(cc) // 获取系统时间(yyyy-MM-dd HH:mm:ss.SSS格式)+ (NSString *)getSystemTimeStr;// print current time using printf func+ (void)printCurrentTime;/. 阅读全文
摘要:
//// CCNSData.m// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import "CCNSData.h"@implementation NSData(cc)// 将UTF8格式的数据进行URL编码,返回编码后的总字节- (int)URLEncode:(char *)dest len:(const int)destLen{ int i; int j = 0; char ch; char *... 阅读全文
摘要:
//// CCNSData.h// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import <Foundation/Foundation.h>typedef enum { NSDATA_UNIT_ONE = 1, NSDATA_UNIT_TWO = 2, NSDATA_UNIT_FOUR = 4, NSDATA_UNIT_MAX}NSD... 阅读全文
摘要:
//// CCNSCalendar.m// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import "CCNSCalendar.h"@implementation NSCalendar(cc)+ (id)GregorianCalendar{ return [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease];}- (NSDateCo 阅读全文
摘要:
//// CCNSCalendar.h// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import <Foundation/Foundation.h>@interface NSCalendar(cc) + (id)GregorianCalendar;- (NSDateComponents *)getComponents;// you should call this immediately after getComponents method t. 阅读全文
摘要:
//// CCNSArray.m// CCFC//// Created by xichen on 11-12-17.// Copyright 2011年 ccteam. All rights reserved.//#import "CCNSArray.h"#import "CCNSObject.h"@implementation NSArray(cc)// 判断一个对象指针(不是对象的值)是否在数组中存在- (BOOL)isPointerExistsInArray:(id)element{ for(id temp in self) { ... 阅读全文