From 3e8437ae559487362fae3525beb79c534c213a51 Mon Sep 17 00:00:00 2001 From: 单军华 Date: Thu, 12 Jul 2018 13:44:34 +0800 Subject: [PATCH] bug修复和功能优化 --- screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Util/Category/UIImage+Resource.m | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Util/Category/UIImage+Resource.m b/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Util/Category/UIImage+Resource.m new file mode 100755 index 0000000..9a107f4 --- /dev/null +++ b/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Util/Category/UIImage+Resource.m @@ -0,0 +1,24 @@ +// +// UIImage+Resource.m +// Pods +// +// Created by EaseMob on 2017/4/20. +// +// + +#import "UIImage+Resource.h" + +#import "EaseUserModel.h" + +@implementation UIImage (Resource) + ++ (UIImage*)easeImageNamed:(NSString *)name +{ + if ([name rangeOfString:@"EaseUIResource.bundle"].location != NSNotFound) { + name = [name stringByReplacingOccurrencesOfString:@"EaseUIResource.bundle/" withString:@""]; + } + NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[EaseUserModel class]] pathForResource:@"EaseUIResource" ofType:@"bundle"]]; + return [UIImage imageWithContentsOfFile:[bundle pathForResource:[NSString stringWithFormat:@"%@@2x",name] ofType:@"png"]]; +} + +@end -- Gitblit v1.8.0