Ei kuvausta

PublicFunction.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // PublicFunction.h
  3. // CommerceManage
  4. //
  5. // Created by 小花 on 2016/12/28.
  6. // Copyright © 2016年 vaic. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface PublicFunction : NSObject
  10. //时间是否过期
  11. + (BOOL)isOuttimeDate:(NSString *)dateStr;
  12. /**
  13. 获得日期时间
  14. @param ctime 时间戳
  15. @return 字符串时间
  16. */
  17. + (NSString *)getDateWith:(NSString *)ctime;
  18. // 返回带有小时的字符串时间
  19. + (NSString *)getDateWithReturnHourWith:(NSString *)ctime;
  20. + (NSString *)addSeparatorPointForPriceString:(NSString *)str;
  21. //计算内容大小
  22. + (CGSize)getAutoWidthWith:(NSString *)text andSize:(CGSize)size andFont:(NSInteger)font;
  23. //阳历转农历
  24. + (NSString *)getChineseCalendarWithDate:(NSString*)date;
  25. //获取当前日期
  26. + (NSString *)getCurrentDate;
  27. //获取当前天
  28. + (NSString *)getCurrentDay;
  29. // 获取通知权限
  30. + (void)isOpenMessageNotificationServiceWithBlock:(void(^)(BOOL))returnBlock;
  31. // 是否是手机号;
  32. + (BOOL)isValiMobile:(NSString *)mobile;
  33. /// 是否安装淘宝app
  34. + (BOOL)isInstallTaobaoAPP;
  35. //获取当前时间戳
  36. +(NSString *)getNowTimeTimestamp;
  37. //md5加密
  38. + (NSString *)md5:(NSString *)str;
  39. //检测网络是否可用
  40. + (BOOL)isAvailableNetworkType;
  41. //字典转json
  42. + (NSString *)convertToJsonData:(NSDictionary *)dict;
  43. @end