UIImage+demobar.m 509 B

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