dkahgld

PublicFunction.h 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. +(NSString *)getYestDay;//获取昨天
  44. +(NSString *)DifferencebetweenCurrentDate:(NSString *)dateStr;
  45. +(void)saveAccountWithPush:(NSString *)push;
  46. +(NSString*)getPush;
  47. +(void) jumpKuaishouWithstr:(NSString *)str;
  48. +(void)saveAccountChangeInfoWithPush:(NSString *)push;
  49. +(NSString*)getPushHead;
  50. + (BOOL)canOpenURL:(NSString *)url;
  51. //保存本地金额显示
  52. +(void)saveMoneyHidden:(NSString *)isHidden;
  53. +(NSString *)GetMoneyStatus;
  54. +(NSString *)backToPassedTimeWithMonthNumber:(NSInteger)number;
  55. +(void)saveMessage:(NSDictionary *)message;
  56. +(NSDictionary *)getMessage;
  57. /// 添加单边阴影效果
  58. +(void)addShadowToView:(UIView *)theView withColor:(UIColor *)theColor ;
  59. + (CGSize)sizeWithString:(NSString *)str font:(UIFont *)font maxSize:(CGSize)maxSize;
  60. @end