TUIDarkModel.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // TUIDarkModel.h
  3. // TUICore
  4. //
  5. // Created by xiangzhang on 2021/9/9.
  6. // Copyright © 2023 Tencent. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @import UIKit;
  10. @interface UIColor (TUIDarkModel)
  11. + (UIColor *)d_colorWithColorLight:(UIColor *)light dark:(UIColor *)dark __attribute__((deprecated("use TUICoreDynamicColor()")));
  12. + (UIColor *)d_systemGrayColor __attribute__((deprecated("use TUICoreDynamicColor()")));
  13. + (UIColor *)d_systemRedColor __attribute__((deprecated("use TUICoreDynamicColor()")));
  14. + (UIColor *)d_systemBlueColor __attribute__((deprecated("use TUICoreDynamicColor()")));
  15. @end
  16. /////////////////////////////////////////////////////////////////////////////////
  17. //
  18. // Dark Mode
  19. //
  20. /////////////////////////////////////////////////////////////////////////////////
  21. @interface UIImage (TUIDarkModel)
  22. /**
  23. * path: normal image path (without @x.png suffix), dark image path must be "normal image path_dark"
  24. */
  25. + (UIImage *)d_imagePath:(NSString *)path __attribute__((deprecated("use TUIDemoBundleThemeImage(imageKey,defaultImageName)")));
  26. /**
  27. *
  28. * imageName: common image name, dark image name must be "ordinary image name_dark"
  29. * bundleName: bundleName where the image is stored
  30. */
  31. + (UIImage *)d_imageNamed:(NSString *)imageName
  32. bundle:(NSString *)bundleName __attribute__((deprecated("use TUIDemoBundleThemeImage(imageKey,defaultImageName)")));
  33. + (UIImage *)d_imageWithImageLight:(NSString *)lightImagePath
  34. dark:(NSString *)darkImagePath __attribute__((deprecated("use TUIDemoBundleThemeImage(imageKey,defaultImageName)")));
  35. + (void)d_fixResizableImage;
  36. + (UIImage *)d_imageWithImageLightImg:(UIImage *)lightImage
  37. dark:(UIImage *)darkImage __attribute__((deprecated("use TUIDemoBundleThemeImage(imageKey,defaultImageName)")));
  38. @end