转载自CSDN
二 iOS常见分类
一些必要的类别iOS开发。包括的NSDate,的NSString,NSUserDefaults的,和的UIColor帮助UIImage的方法。
1. NSDate
-(NSString *)formatWithString:(NSString *)format;
-(NSString *)formatWithStyle:(NSDateFormatterStyle)style;
-(NSString *)distanceOfTimeInWords;
-(NSString *)distanceOfTimeInWords:(NSDate *)date;
2. NSString
-(NSString *)MD5;
-(NSString *)sha1;
-(NSString *)reverse;
-(NSString *)URLEncode;
-(NSString *)URLDecode;
-(NSString *)stringByStrippingWhitespace;
-(NSString *)substringFrom:(NSInteger)from to:(NSInteger)to;
-(NSString *)CapitalizeFirst:(NSString *)source;
-(NSString *)UnderscoresToCamelCase:(NSString*)underscores;
-(NSString *)CamelCaseToUnderscores:(NSString *)input;
-(NSUInteger)countWords;
-(BOOL)contains:(NSString *)string;
-(BOOL)isBlank;
3. NSUserDefaults
+(void)saveObject:(id)object forKey:(NSString *)key;
+(id)retrieveObjectForKey:(NSString *)key;
+(void)deleteObjectForKey:(NSString *)key;
4. UIColor
+(UIColor *)colorWithHex:(int)hex;
5. UIImage + GIF
+(UIImage *)animatedImageWithAnimatedGIFData:(NSData *)theData;
+(UIImage *)animatedImageWithAnimatedGIFURL:(NSURL *)theURL;
下载地址:http://download.csdn.net/detail/baihuaxiu123/9509303
三 辅助软件
1:XCODE文档注解插件VVDocumenter
地址:https://github.com/onevcat/VVDocumenter-Xcode
2:将JSON格式化输出为模型的属性
地址:https://github.com/EnjoySR/ESJsonFormat-Xcode
3:图片提示插件
地址:https://github.com/ksuther/KSImageNamed-Xcode
4:图片转换插件
地址:https://github.com/rickytan/RTImageAssets
网友评论