WFCUUtilities.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Utilities.h
  3. // WFChat UIKit
  4. //
  5. // Created by WF Chat on 2017/9/1.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface WFCUUtilities : NSObject
  10. + (CGSize)getTextDrawingSize:(NSString *)text
  11. font:(UIFont *)font
  12. constrainedSize:(CGSize)constrainedSize;
  13. + (NSString *)formatTimeLabel:(int64_t)timestamp;
  14. + (NSString *)formatTimeDetailLabel:(int64_t)timestamp;
  15. + (UIImage *)thumbnailWithImage:(UIImage *)originalImage maxSize:(CGSize)size;
  16. + (NSString *)formatSizeLable:(int64_t)size;
  17. + (UIImage *)imageForExt:(NSString *)extName;
  18. + (NSString *)getUnduplicatedPath:(NSString *)path;
  19. + (BOOL)isFileExist:(NSString *)filePath;
  20. /// 顶部状态栏高度(包括安全区)
  21. + (CGFloat)wf_statusBarHeight;
  22. /// 导航栏的高度
  23. + (CGFloat)wf_navigationHeight;
  24. /// 状态栏+导航栏的高度
  25. + (CGFloat)wf_navigationFullHeight;
  26. /// 底部安全高度
  27. + (CGFloat)wf_safeDistanceBottom;
  28. ///已授权返回YES,否则返回NO
  29. + (BOOL)checkRecordOrCameraPermission:(BOOL)isAudio complete:(void (^)(BOOL granted))complete viewController:(UIViewController *)controller;
  30. @end