摘要:
// ⚠️颜色转换为背景图片 - (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBeginImageContext(rect.size) 阅读全文
摘要:
/** 是否全数字 @param string @return */ - (BOOL)isAllNum:(NSString *)string{ unichar c; for (int i=0; i<string.length; i++) { c=[string characterAtIndex:i] 阅读全文
摘要:
// ⚠️用字符串[emoji]替换emoji表情😈 - (NSString *)disable_emoji:(NSString *)text { NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPatt 阅读全文
摘要:
/** 获取缓存路径 @return */ - (NSString *)getCachesPath{ // 获取Caches目录路径 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomai 阅读全文
摘要:
_listTable.tableFooterView=[[UIView alloc]init];//关键语句,隐藏空行 _listTable.separatorInset = UIEdgeInsetsZero;//⚠️cell分界线与table等宽 阅读全文
摘要:
/** *得到本机现在用的语言 * en:英文 zh-Hans-CN zh-Hans:简体中文 zh-Hant:繁体中文 ja:日本 ...... */ +(NSString* )getPreferredLanguage { NSUserDefaults* defs = [NSUserDefault 阅读全文
摘要:
+(UIImage*)getImageByRetina:(NSString*)imageName { float nativeWidth= MIN([[UIScreen mainScreen] nativeBounds].size.width,[[UIScreen mainScreen] nativ 阅读全文
摘要:
#define RGB(r, g, b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1.0f] #define RGBA(r, g, b, a) [UIColor colorWithRed:(r)/ 阅读全文
摘要:
Reachability *reach = [Reachability reachabilityWithHostName:@"www.apple.com"]; NetworkStatus netStatus; switch ([reach currentReachabilityStatus]) { 阅读全文
摘要:
//⚠️时间转换成模板字符串 + (NSString *)ConvertStrToTime:(NSString *)timeStr { long long time=[timeStr longLongValue]; NSDate *d = [[NSDate alloc]initWithTimeInt 阅读全文