UIImage+demobar.m 455 B

12345678910111213141516171819202122
  1. //
  2. // UIImage+demobar.m
  3. // PFAPIDemoBar
  4. //
  5. //
  6. // Created by mumu on 2021/9/6.
  7. //
  8. #import "UIImage+demobar.h"
  9. #import "PFAPIDemoBar.h"
  10. @implementation UIImage (demobar)
  11. + (UIImage *)imageWithName:(NSString *)name {
  12. UIImage *image = [UIImage imageNamed:name inBundle:[NSBundle bundleForClass:PFAPIDemoBar.class] compatibleWithTraitCollection:nil];
  13. if (image == nil) {
  14. image = [UIImage imageNamed:name];
  15. }
  16. return image;
  17. }
  18. @end