摘要: // ⚠️颜色转换为背景图片 - (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBeginImageContext(rect.size) 阅读全文
posted @ 2017-01-23 11:02 Panthera-leo 阅读(122) 评论(0) 推荐(0) 编辑
摘要: /** 是否全数字 @param string @return */ - (BOOL)isAllNum:(NSString *)string{ unichar c; for (int i=0; i<string.length; i++) { c=[string characterAtIndex:i] 阅读全文
posted @ 2017-01-23 10:54 Panthera-leo 阅读(132) 评论(0) 推荐(0) 编辑
摘要: // ⚠️用字符串[emoji]替换emoji表情😈 - (NSString *)disable_emoji:(NSString *)text { NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPatt 阅读全文
posted @ 2017-01-23 10:44 Panthera-leo 阅读(1342) 评论(0) 推荐(0) 编辑
摘要: /** 获取缓存路径 @return */ - (NSString *)getCachesPath{ // 获取Caches目录路径 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomai 阅读全文
posted @ 2017-01-23 10:32 Panthera-leo 阅读(115) 评论(0) 推荐(0) 编辑
摘要: _listTable.tableFooterView=[[UIView alloc]init];//关键语句,隐藏空行 _listTable.separatorInset = UIEdgeInsetsZero;//⚠️cell分界线与table等宽 阅读全文
posted @ 2017-01-23 10:29 Panthera-leo 阅读(65) 评论(0) 推荐(0) 编辑
摘要: /** *得到本机现在用的语言 * en:英文 zh-Hans-CN zh-Hans:简体中文 zh-Hant:繁体中文 ja:日本 ...... */ +(NSString* )getPreferredLanguage { NSUserDefaults* defs = [NSUserDefault 阅读全文
posted @ 2017-01-23 10:20 Panthera-leo 阅读(85) 评论(0) 推荐(0) 编辑
摘要: +(UIImage*)getImageByRetina:(NSString*)imageName { float nativeWidth= MIN([[UIScreen mainScreen] nativeBounds].size.width,[[UIScreen mainScreen] nativ 阅读全文
posted @ 2017-01-23 10:08 Panthera-leo 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #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)/ 阅读全文
posted @ 2017-01-23 09:59 Panthera-leo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Reachability *reach = [Reachability reachabilityWithHostName:@"www.apple.com"]; NetworkStatus netStatus; switch ([reach currentReachabilityStatus]) { 阅读全文
posted @ 2017-01-23 09:54 Panthera-leo 阅读(78) 评论(0) 推荐(0) 编辑
摘要: //⚠️时间转换成模板字符串 + (NSString *)ConvertStrToTime:(NSString *)timeStr { long long time=[timeStr longLongValue]; NSDate *d = [[NSDate alloc]initWithTimeInt 阅读全文
posted @ 2017-01-23 09:51 Panthera-leo 阅读(143) 评论(0) 推荐(0) 编辑