PBPublic.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // PBPublic.h
  3. // PBSDK
  4. //
  5. // Created by LStar on 2025/1/6.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface PBPublic : NSObject
  10. ///获取昵称
  11. + (NSString *)getNickname;
  12. ///获取头像
  13. + (NSString *)getIcon;
  14. ///是否为空字符串
  15. + (BOOL)isNotBlankString:(id)string ;
  16. /**
  17. 判断字符串是否为空返回""
  18. @param string 传进来的字符串
  19. @return NSString 返回的结果字符串
  20. */
  21. + (NSString *)blankString:(id)string;
  22. ///退出登录的操作
  23. + (void)loginOut:(void(^)(void))handle;
  24. /// IM登录操作
  25. + (void)loginIM:(void(^)(void))handle;
  26. /**
  27. 根据传入的字符串生成不同的格式
  28. @param dateStr 传入的字符串
  29. @param mode 对应的类型
  30. 1 yyyy-MM-dd (年-月-日)
  31. 2 yyyy年MM月dd日 (%d年%d月%d日)
  32. 3 yyyy-MM-dd HH:mm (年-月-日 时:分)
  33. 4 yyyy.MM.dd HH:mm(年.月.日 时:分)
  34. 5.yyyy/MM/dd (年/月/日)
  35. 6.MM-dd HH:mm (月-日 时:分)
  36. @return NSString 生成的字符串
  37. */
  38. + (NSString *)formatDate:(NSString *)dateStr mode:(NSInteger)mode;
  39. @end
  40. NS_ASSUME_NONNULL_END