CSJTools 是一个为 iOS 开发者提供的 Objective-C 库。
platform :ios, '6.0'
pod 'CSJTools'
//import all .h
//common define & log
//return NSString/NSData base64 String
//NSString
+(NSString *)stringFromBase64String:(NSString *)base64String;
-(NSString *)base64String;
//NSData
+(NSData *)dataWithBase64String:(NSString *)base64String;
-(NSString *)base64String;
+(NSData *)dataFromBase64String:(NSString *)base64String;
+(NSString *)base64StringFromData:(NSData *)data;
//天数差
+(NSInteger)daysBetweenDate:(NSDate*)fromDateTime andDate:(NSDate*)toDateTime;
//小时差
+(NSInteger)hoursBetweenDate:(NSDate *)fromDateTime andDate:(NSDate*)toDateTime;
//分钟差
+(NSInteger)minsBetweenDate:(NSDate*)fromDateTime andDate:(NSDate*)toDateTime;
//秒差
+(NSInteger)secondBetweenDate:(NSDate*)fromDateTime andDate:(NSDate*)toDateTime;
//返回当前年,月,日..
-(int)year;
-(int)month;
-(int)day;
-(int)hour;
-(int)minute;
-(int)second;
//与服务器的加密解密
//加密
- (NSString *) DESEncryptByKey:(NSString *)key;
//解密
- (NSString *) DESDecryptByKey:(NSString *)key;
-(NSString *)fileMD5;
-(NSString *)stringMD5;
+(NSString *)md5:(NSString *)inPutText;
//判断是否是电话号码
- (BOOL)isMobileNumber;
//email
-(BOOL)isEmailAddress;
-(NSString *)parameterForKey:(NSString *)key;
-(NSDictionary *)parameters;
自定义手势用于返回 Navigationcontroller
自动 NSFetchedResults CoreData TableviewController
+ (CGSize)textSize:(NSString*)text withFont:(UIFont*)font inWidth:(CGFloat)width;
感谢他们激发了我的灵感。感谢他们对开源社区的贡献。
CSJTools 在 MIT 许可证下可用。