轉(zhuǎn)載自CSDN
二 iOS常見(jiàn)分類(lèi)
一些必要的類(lèi)別iOS開(kāi)發(fā)。包括的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:圖片轉(zhuǎn)換插件
地址:https://github.com/rickytan/RTImageAssets