Latest 1.8.6
Homepage https://github.com/CainLuo/CLFoundation
License MIT
Platforms ios 8.0
Frameworks UIKit, Foundation
Authors

CocoaPods Compatible Carthage Compatible Platform Language

CLFoundation简介

CLFoundation是对系统Foundation API进行扩展的库, API的用法全部都在CLFoundationExample里, 如果在使用库遇到的一些疑惑欢迎随时Issues给我.

支持CocoaPod管理

pod ‘CLFoundation’

支助

如果您觉得挺赞的话, 可以给我打赏打赏, 谢谢啦~

支付宝

目录

[email protected]

CLSpeechSynthesizer基于AVFoundation实现的语音播报工具类:

+ (instancetype)sharedSpeechSynthesizer;

- (BOOL)cl_isSpeaking;

- (void)cl_speakString:(NSString *)string;

- (void)cl_stopSpeak;

- (void)cl_chooseVoiceWithLanguage:(NSString *)language
                        speakSpeed:(CGFloat)speakSpeed;

[email protected]

针对FoundationNSArray进行系统外的方法补充:

+ (instancetype)cl_initSafeArrayWithObject:(id)object;

- (id)cl_safeObjectAtIndex:(NSUInteger)index;

- (NSArray *)cl_safeArrayWithRange:(NSRange)range;

- (NSUInteger)cl_safeIndexOfObject:(id)object;

+ (NSArray *)cl_getArrayWithPlistName:(NSString *)name;

[email protected]

针对FoundationNSAttributedString进行系统外的方法补充:

- (CGFloat)cl_attributedStringHeightWithContainWidth:(CGFloat)width;

+ (NSAttributedString *)cl_attributeStringWithString:(NSString *)string
                                               color:(UIColor *)color
                                               range:(NSRange)range;

+ (NSAttributedString *)cl_attributeStringWithAttributedString:(NSAttributedString *)attributedString
                                                         color:(UIColor *)color
                                                         range:(NSRange)range;

+ (NSAttributedString *)cl_attributeStringWithString:(NSString *)string
                                                font:(UIFont *)font
                                               range:(NSRange)range;

+ (NSAttributedString *)cl_attributeStringWithAttributedString:(NSAttributedString *)attributedString
                                                          font:(UIFont *)font
                                                         range:(NSRange)range;

+ (NSAttributedString *)cl_attributeStringWithPrefixString:(NSString *)prefixString
                                                prefixFont:(UIFont *)prefixFont
                                              suffixString:(NSString *)suffixString
                                                suffixFont:(UIFont *)suffixFont;

+ (NSAttributedString *)cl_attributeStringWithPrefixString:(NSString *)prefixString
                                                prefixFont:(UIFont *)prefixFont
                                               prefixColor:(UIColor *)prefixColor
                                              suffixString:(NSString *)suffixString
                                                suffixFont:(UIFont *)suffixFont
                                               suffixColor:(UIColor *)suffixColor;

[email protected]

针对FoundationNSBundle进行系统外的方法补充:

+ (NSString *)cl_getBundleDisplayName;

+ (NSString *)cl_getBundleShortVersionString;

+ (NSString *)cl_getBundleVersion;

+ (NSString *)cl_getBundleIdentifier;

[email protected]

针对FoundationNSData进行系统外的方法补充:

typedef NS_ENUM(NSInteger, CLEncodedType) {

    CLEncodedType64 = 64,
    CLEncodedType76 = 76
};

+ (NSData *)cl_compressOriginalImage:(UIImage *)image
                  compressionQuality:(CGFloat)compressionQuality;

+ (NSString *)cl_replacingAPNsTokenWithData:(NSData *)data;

+ (NSData *)cl_transformDataWithBase64EncodedString:(NSString *)string;

+ (NSString *)cl_transformBase64EncodedStringWithData:(NSData *)data
                                            wrapWidth:(CLEncodedType)wrapWidth;

- (NSData *)cl_encryptedDataWithAESKey:(NSString *)key
                           encryptData:(NSData *)encryptData;

- (NSData *)cl_decryptedDataWithAESKey:(NSString *)key
                           decryptData:(NSData *)decryptData;

- (NSData *)cl_encryptedDataWith3DESKey:(NSString *)key
                            encryptData:(NSData *)encryptData;

- (NSData *)cl_decryptedDataWith3DEKey:(NSString *)key
                           decryptData:(NSData *)decryptData;

- (NSString *)cl_encryptredMD2String;

- (NSData *)cl_encryptredMD2Data;

- (NSString *)cl_encryptredMD4String;

- (NSData *)cl_encryptredMD4Data;

- (NSString *)cl_encryptredMD5String;

- (NSString *)cl_hmacEncryptredMD5StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredMD5Data;

- (NSData *)cl_hmacEncryptredMD5DataWithKey:(NSData *)key;

- (NSString *)cl_encryptredSHA1String;

- (NSString *)cl_hmacEncryptredSHA1StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredSHA1Data;

- (NSData *)cl_hmacEncryptredSHA1DataWithKey:(NSData *)key;

- (NSString *)cl_encryptredSHA224String;

- (NSString *)cl_hmacEncryptredSHA224StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredSHA224Data;

- (NSData *)cl_hmacEncryptredSHA224DataWithKey:(NSData *)key;

- (NSString *)cl_encryptredSHA256String;

- (NSString *)cl_hmacEncryptredSHA256StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredSHA256Data;

- (NSData *)cl_hmacEncryptredSHA256DataWithKey:(NSData *)key;

- (NSString *)cl_encryptredSHA384String;

- (NSString *)cl_hmacEncryptredSHA384StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredSHA384Data;

- (NSData *)cl_hmacEncryptredSHA384DataWithKey:(NSData *)key;

- (NSString *)cl_encryptredSHA512String;

- (NSString *)cl_hmacEncryptredSHA512StringWithKey:(NSString *)key;

- (NSData *)cl_encryptredSHA512Data;

- (NSData *)cl_hmacEncryptredSHA512DataWithKey:(NSData *)key;

- (id)cl_dataJSONValueDecoded;

+ (NSData *)cl_getDataWithBundleNamed:(NSString *)name;

[email protected]

针对FoundationNSDate进行系统外的方法补充:

NSDate的属性

@property (nonatomic, readonly) NSInteger cl_year;
@property (nonatomic, readonly) NSInteger cl_month;
@property (nonatomic, readonly) NSInteger cl_day;
@property (nonatomic, readonly) NSInteger cl_hour;
@property (nonatomic, readonly) NSInteger cl_minute;
@property (nonatomic, readonly) NSInteger cl_second;
@property (nonatomic, readonly) NSInteger cl_nanosecond;
@property (nonatomic, readonly) NSInteger cl_weekday;
@property (nonatomic, readonly) NSInteger cl_weekdayOrdinal;
@property (nonatomic, readonly) NSInteger cl_weekOfMonth;
@property (nonatomic, readonly) NSInteger cl_weekOfYear;
@property (nonatomic, readonly) NSInteger cl_yearForWeekOfYear;
@property (nonatomic, readonly) NSInteger cl_quarter;
@property (nonatomic, readonly) BOOL cl_isLeapMonth;
@property (nonatomic, readonly) BOOL cl_isLeapYear;
@property (nonatomic, readonly) BOOL cl_isToday;
@property (nonatomic, readonly) BOOL cl_isYesterday;

时间戳处理/计算日期@

+ (NSString *)cl_compareCureentTimeWithDate:(NSTimeInterval)timeStamp;

+ (NSString *)cl_getCurrentTimeStampString;

+ (NSTimeInterval)cl_getCurrentTimeStamp;

+ (NSString *)cl_displayTimeWithTimeStamp:(NSTimeInterval)timeStamp;

+ (NSString *)cl_calculateDaysWithDate:(NSDate *)date;

日期处理@

+ (NSUInteger)cl_getEraWithDate:(NSDate *)date;

+ (NSUInteger)cl_getYearWithDate:(NSDate *)date;

+ (NSUInteger)cl_getMonthWithDate:(NSDate *)date;

+ (NSUInteger)cl_getDayWithDate:(NSDate *)date;

+ (NSUInteger)cl_getHourWithDate:(NSDate *)date;

+ (NSUInteger)cl_getMinuteWithDate:(NSDate *)date;

+ (NSUInteger)cl_getSecondWithDate:(NSDate *)date;

+ (NSInteger)cl_getWeekdayStringFromDate:(NSDate *)date;

+ (NSInteger)cl_getDateTimeDifferenceWithBeginDate:(NSDate *)beginDate
                                           endDate:(NSDate *)endDate;

+ (NSDate *)cl_getMonthFirstDeteWithDate:(NSDate *)date;

+ (NSDate *)cl_getMonthLastDayWithDate:(NSDate *)date;

+ (NSUInteger)cl_getWeekOfYearWithDate:(NSDate *)date;

+ (NSDate *)cl_getTomorrowDay:(NSDate *)date;

+ (NSDate *)cl_getYearDateWithDate:(NSDate *)date
                             years:(NSInteger)years;

+ (NSDate *)cl_getMonthDateWithDate:(NSDate *)date
                             months:(NSInteger)months;

+ (NSDate *)cl_getDaysDateWithDate:(NSDate *)date
                              days:(NSInteger)days;

+ (NSDate *)cl_getHoursDateWithDate:(NSDate *)date
                              hours:(NSInteger)hours;

日期格式化

+ (NSString *)cl_getStringDateWithTimeStamp:(NSTimeInterval)timeStamp
                                  formatter:(NSString *)formatter;

- (NSString *)cl_getStringDateWithFormatter:(NSString *)formatter;

+ (NSString *)cl_getStringDateWithDate:(NSDate *)date
                             formatter:(NSString *)formatter;

+ (NSString *)cl_getStringDateWithDate:(NSDate *)date
                             formatter:(NSString *)formatter
                              timeZone:(NSTimeZone *)timeZone
                                locale:(NSLocale *)locale;

+ (NSDate *)cl_getDateWithDateString:(NSString *)dateString
                           formatter:(NSString *)formatter;

+ (NSDate *)cl_getDateWithDateString:(NSString *)dateString
                           formatter:(NSString *)formatter
                            timeZone:(NSTimeZone *)timeZone
                              locale:(NSLocale *)locale;

日期判断@

+ (BOOL)cl_isLeapYear:(NSDate *)date;

+ (BOOL)cl_checkTodayWithDate:(NSDate *)date;

获取[email protected]

+ (NSDateComponents *)cl_getCalendarWithUnitFlags:(NSCalendarUnit)unitFlags
                                             date:(NSDate *)date;

[email protected]

针对FoundationNSDictionary进行系统外的方法补充:

+ (NSDictionary *)cl_dictionaryWithPlistData:(NSData *)plist;

+ (NSDictionary *)cl_dictionaryWithURLString:(NSString *)urlString;

- (NSArray *)cl_getAllKeysSorted;

- (NSArray *)cl_getAllValuesSortedByKeys;

- (BOOL)cl_containsObjectForKey:(id)key;

- (NSDictionary *)cl_getDictionaryForKeys:(NSArray *)keys;

[email protected]

针对FoundationNSFileManager进行系统外的方法补充:

+ (BOOL)cl_saveDataCacheWithData:(NSData *)data
                      identifier:(NSString *)identifier;

+ (BOOL)cl_saveDataCacheWithData:(NSData *)data
                       cacheName:(NSString *)cacheName
                      identifier:(NSString *)identifier;

+ (NSData *)cl_getDataCacheWithIdentifier:(NSString *)identifier;

+ (NSData *)cl_getDataCacheWithCacheName:(NSString *)cacheName
                              identifier:(NSString *)identifier;

+ (BOOL)cl_removeDataWithCache;

+ (BOOL)cl_removeDataWithCacheWithCacheName:(NSString *)cacheName;

+ (BOOL)cl_saveDocumentWithObject:(id)object
                         fileName:(NSString *)fileName;

+ (BOOL)cl_removeDocumentObjectWithFileName:(NSString *)fileName;

+ (id)cl_getDocumentObjectWithFileName:(NSString *)fileName;

+ (BOOL)cl_checkFileExistWithFilePath:(NSString *)filePath;

+ (NSUInteger)cl_getApplicationDocumentSize;

+ (NSUInteger)cl_getApplicationCacheSize;

+ (NSUInteger)cl_getApplicationLibrarySize;

+ (NSUInteger)cl_getApplicationFileSizeWithFilePath:(NSString *)folderPath;

[email protected]

针对FoundationNSMutableArray进行系统外的方法补充:

- (void)cl_addSafeObject:(id)object;

- (void)cl_insertSafeObject:(id)object
                      index:(NSUInteger)index;

- (void)cl_safeRemoveObjectAtIndex:(NSUInteger)index;

- (void)cl_safeRemoveObjectsInRange:(NSRange)range;

[email protected]

针对FoundationNSMutableAttributedString进行系统外的方法补充:

+ (NSMutableAttributedString *)cl_attributeStringWithSubffixString:(NSString *)subffixString
                                                      subffixImage:(UIImage *)subffixImage;

+ (NSMutableAttributedString *)cl_attributeStringWithSubffixString:(NSString *)subffixString
                                                     subffixImages:(NSArray<UIImage *> *)subffixImages;

+ (NSMutableAttributedString *)cl_attributeStringWithPrefixString:(NSString *)prefixString
                                                      prefixImage:(UIImage *)prefixImage;

+ (NSMutableAttributedString *)cl_attributeStringWithPrefixString:(NSString *)prefixString
                                                     prefixImages:(NSArray<UIImage *> *)prefixImages;

+ (NSMutableAttributedString *)cl_attributedStringWithString:(NSString *)string
                                                 lineSpacing:(CGFloat)lineSpacing;

+ (NSMutableAttributedString *)cl_attributedStringWithAttributedString:(NSAttributedString *)attributedString
                                                           lineSpacing:(CGFloat)lineSpacing;

+ (NSMutableAttributedString *)cl_attributedStringAddLineWithString:(NSString *)string
                                                              range:(NSRange)range;

+ (NSMutableAttributedString *)cl_attributedStringAddLineWithAttributedString:(NSAttributedString *)attributedString
                                                                        range:(NSRange)range;

[email protected]

针对FoundationNSMutableDictionary进行系统外的方法补充:

- (void)cl_setSafeObject:(id)object
                  forKey:(id)key;

- (id)cl_safeObjectForKey:(id)key;

- (id)cl_safeKeyForValue:(id)value;

+ (NSMutableDictionary *)cl_mutableDictionaryWithPlistData:(NSData *)plist;

- (NSMutableDictionary *)cl_popEntriesForKeys:(NSArray *)keys;

[email protected]

针对FoundationNSNumber进行系统外的方法补充:

+ (NSString *)cl_displayDecimalWithNumber:(NSNumber *)number
                                    digit:(NSUInteger)digit;

+ (NSString *)cl_displayCurrencyWithNumber:(NSNumber *)number
                                     digit:(NSUInteger)digit;

+ (NSString *)cl_displayPercentWithNumber:(NSNumber *)number
                                    digit:(NSUInteger)digit;

+ (NSNumber *)cl_roundingWithNumber:(NSNumber *)number
                              digit:(NSUInteger)digit;

+ (NSNumber *)cl_roundCeilingWithNumber:(NSNumber *)number
                                  digit:(NSUInteger)digit;

+ (NSNumber *)cl_roundFloorWithNumber:(NSNumber *)number
                                digit:(NSUInteger)digit;

[email protected]

针对FoundationNSObject进行系统外的方法补充:

[email protected]

+ (void)cl_exchangeImplementationsWithClass:(Class)class
                           originalSelector:(SEL)originalSelector
                           swizzledSelector:(SEL)swizzledSelector;

+ (BOOL)cl_addMethodWithClass:(Class)class
             originalSelector:(SEL)originalSelector
             swizzledSelector:(SEL)swizzledSelector;

+ (void)cl_replaceMethodWithClass:(Class)class
                 originalSelector:(SEL)originalSelector
                 swizzledSelector:(SEL)swizzledSelector;

+ (NSArray <NSString *> *)cl_getClassList;

+ (NSArray <NSString *> *)cl_getClassMethodListWithClass:(Class)class;

+ (NSArray <NSString *> *)cl_getPropertyListWithClass:(Class)class;

+ (NSArray <NSString *> *)cl_getIVarListWithClass:(Class)class;

+ (NSArray <NSString *> *)cl_getProtocolListWithClass:(Class)class;

- (BOOL)cl_hasPropertyWithKey:(NSString *)key;

- (BOOL)cl_hasIvarWithKey:(NSString *)key;

[email protected]

- (void)cl_performAsyncWithComplete:(CLObject)complete;

- (void)cl_performMainThreadWithComplete:(CLObject)complete
                               isWait:(BOOL)isWait;

- (void)cl_performWithAfterSecond:(NSTimeInterval)afterSecond
                         complete:(CLObject)complete;

[email protected]

针对FoundationNSString进行系统外的方法补充:

字符串计算

- (CGFloat)cl_heightWithFontSize:(CGFloat)fontSize
                           width:(CGFloat)width;

+ (CGFloat)cl_measureHeightWithMutilineString:(NSString *)string
                                         font:(UIFont *)font
                                        width:(CGFloat)width;

+ (CGFloat)cl_measureSingleLineStringWidthWithString:(NSString *)string
                                                font:(UIFont *)font;

+ (CGSize)cl_measureStringSizeWithString:(NSString *)string
                                    font:(UIFont *)font;

+ (CGSize)cl_measureStringWithString:(NSString *)string
                                font:(UIFont *)font
                                size:(CGSize)size
                                mode:(NSLineBreakMode)lineBreakMode;

字符串过滤

- (NSString *)cl_removeUnwantedZero;

- (NSString *)cl_trimmedString;

- (NSString *)cl_trimmedAllString;

- (NSString *)cl_removeStringCharacterWithCharacter:(NSString *)character;

字符串格式化

+ (NSString *)cl_getNumberWithString:(NSString *)string;

+ (NSString *)cl_getSecrectStringWithCardNumber:(NSString *)cardNumber;

+ (NSString *)cl_getSecrectStringWithPhoneNumber:(NSString *)phoneNumber;

+ (NSString *)cl_stringMobileFormat:(NSString *)phoneNumber;

+ (NSString *)cl_stringMobileFormat:(NSString *)phoneNumber
                          separator:(NSString *)separator;

+ (NSString *)cl_stringUnitFormat:(CGFloat)value
                       unitString:(NSString *)unitString;

Base64加密字符串

+ (NSString *)cl_base64StringFromData:(NSData *)data
                               length:(NSUInteger)length;

+ (NSString *)cl_encodingBase64WithString:(NSString *)string;

+ (NSString *)cl_decodedBase64WithString:(NSString *)string;

MD加密字符串@

+ (NSString *)cl_encodingMD2WithString:(NSString *)string;

+ (NSString *)cl_encodingMD4WithString:(NSString *)string;

+ (NSString *)cl_encodingMD5WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingMD5StringWithString:(NSString *)string
                                             key:(NSString *)key;

SHA加密字符串@

+ (NSString *)cl_encodingSHA1WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingSHA1StringWithString:(NSString *)string
                                              key:(NSString *)key;

+ (NSString *)cl_encodingSHA224WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingSHA224StringWithString:(NSString *)string
                                                key:(NSString *)key;

+ (NSString *)cl_encodingSHA256WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingSHA256StringWithString:(NSString *)string
                                                key:(NSString *)key;

+ (NSString *)cl_encodingSHA384WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingSHA384StringWithString:(NSString *)string
                                                key:(NSString *)key;

+ (NSString *)cl_encodingSHA512WithString:(NSString *)string;

+ (NSString *)cl_hmacEncodingSHA512StringWithString:(NSString *)string
                                                key:(NSString *)key;

NSString获取首字母@

+ (NSString *)cl_getFirstCharactorWithString:(NSString *)string;

+ (NSString *)cl_getFirstPinYinWithString:(NSString *)string;

正则表达式(数字相关)@

- (BOOL)cl_realContainDecimal;

正则表达式验证(整数相关)@

- (BOOL)cl_isNumber;

- (BOOL)cl_checkMostNumber:(NSInteger)quantity;

- (BOOL)cl_checkAtLeastNumber:(NSInteger)quantity;

- (BOOL)cl_checkLeastNumber:(NSInteger)leastNumber
                 mostNumber:(NSInteger)mostNumber;

- (BOOL)cl_isNotZeroStartNumber;

- (BOOL)cl_isNotZeroPositiveInteger;

- (BOOL)cl_isNotZeroNegativeInteger;

- (BOOL)cl_isPositiveInteger;

- (BOOL)cl_isNegativeInteger;

正则表达式验证(浮点数相关)@

- (BOOL)cl_isFloat;

- (BOOL)cl_isPositiveFloat;

- (BOOL)cl_isNagativeFloat;

- (BOOL)cl_isNotZeroStartNumberHaveOneOrTwoDecimal;

- (BOOL)cl_isHaveOneOrTwoDecimalPositiveOrNegative;

- (BOOL)cl_isPositiveRealHaveTwoDecimal;

- (BOOL)cl_isHaveOneOrThreeDecimalPositiveOrNegative;

正则表达式验证(字符串相关)@

- (BOOL)cl_isChineseCharacter;

- (BOOL)cl_isEnglishOrNumbers;

- (BOOL)cl_limitinglength:(NSInteger)fistRange
                lastRange:(NSInteger)lastRange;

- (BOOL)cl_checkString:(NSInteger)length;

- (BOOL)cl_isLettersString;

- (BOOL)cl_isCapitalLetters;

- (BOOL)cl_isLowercaseLetters;

- (BOOL)cl_isNumbersOrLettersOrLineString;

- (BOOL)cl_isChineseCharacterOrEnglishOrNumbersOrLineString;

- (BOOL)cl_isDoesSpecialCharactersString;

- (BOOL)cl_isContainSpecialCharacterString;

- (BOOL)cl_isContainCharacter:(NSString *)charater;

- (BOOL)cl_isLetterStar;

- (BOOL)cl_checkStringIsStrong;

- (BOOL)cl_checkChineseCharacter;

- (BOOL)cl_checkDoubleByteCharacters;

- (BOOL)cl_checkBlankLines;

- (BOOL)cl_checkFirstAndLastSpaceCharacters;

正则表达式验证(号码相关)@

- (BOOL)cl_checkPhoneNumber;

- (BOOL)cl_checkChinaMobelPhoneNumber;

- (BOOL)cl_checkChinaUnicomPhoneNumber;

- (BOOL)cl_checkChinaTelecomPhoneNumber;

- (BOOL)cl_checkTelePhoneNumber;

- (BOOL)cl_checkFormatTelePhoneNumber;

正则表达式验证(身份证相关)@

- (BOOL)cl_checkIdentityCard;

正则表达式验证(账号相关)@

- (BOOL)cl_checkAccount;

- (BOOL)cl_checkPassword;

- (BOOL)cl_checkStrongPassword:(NSInteger)briefest
                       longest:(NSInteger)longest;

正则表达式验证(日期相关)@

- (BOOL)cl_checkChinaDateFormat;

- (BOOL)cl_checkAbroadDateFormat;

- (BOOL)cl_checkMonth;

- (BOOL)cl_checkDay;

正则表达式验证(特殊正则)@

- (BOOL)cl_checkEmailAddress;

- (BOOL)cl_checkDomainName;

- (BOOL)cl_checkURL;

- (BOOL)cl_checkXMLFile;

- (BOOL)cl_checkHTMLSign;

- (BOOL)cl_checkQQNumber;

- (BOOL)cl_checkPostalCode;

- (BOOL)cl_checkIPv4InternetProtocol;

- (BOOL)cl_regularWithRule:(NSString *)rule;

[email protected]

针对FoundationNSTimer进行系统外的方法补充:

+ (NSTimer *)cl_scheduledTimerWithTimeInterval:(NSTimeInterval)timeInterval
                                       repeats:(BOOL)repeats
                                      complete:(CLTimer)complete;

+ (NSTimer *)cl_timerWithTimeInterval:(NSTimeInterval)timeInterval
                              repeats:(BOOL)repeats
                             complete:(CLTimer)complete;

- (void)cl_resumeTimer;

- (void)cl_pauseTimer;

- (void)cl_resumeTimerAfterTimeInterval:(NSTimeInterval)timeInterval;

[email protected]

针对FoundationNSURL进行系统外的方法补充:

+ (void)cl_openBrowserWithURL:(NSString *)urlString;

+ (NSURL *)cl_getDocumentFileURL;

+ (NSURL *)cl_getLibraryFileURL;

+ (NSURL *)cl_getCachesFileURL;

+ (NSURL *)cl_getFileURLForDirectory:(NSSearchPathDirectory)directory;

+ (NSString *)cl_getDocumentPathURL;

+ (NSString *)cl_getLibraryPathURL;

+ (NSString *)cl_getCachesPathURL;

+ (NSString *)cl_getPathURLForDirectory:(NSSearchPathDirectory)directory;

Latest podspec

{
    "name": "CLFoundation",
    "version": "1.8.6",
    "summary": "CLFoundation of iOS",
    "homepage": "https://github.com/CainLuo/CLFoundation",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "CainLuo": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/CainLuo/CLFoundation.git",
        "tag": "1.8.6"
    },
    "source_files": [
        "CLFoundation",
        "CLFoundation/**/*.{h,m}"
    ],
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "subspecs": [
        {
            "name": "CLFoundation+Category",
            "source_files": "CLFoundation+Category/**/*.{h,m}"
        }
    ]
}

Pin It on Pinterest

Share This