单军华
2018-07-11 7b02207537d35bfa1714bf8beafc921f717d100a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
//  UIImage+HMEmoticon.m
//  表情键盘
//
//  Created by 刘凡 on 16/3/3.
//  Copyright © 2016年 itcast. All rights reserved.
//
 
#import "UIImage+HMEmoticon.h"
#import "NSBundle+HMEmoticon.h"
 
@implementation UIImage (HMEmoticon)
 
+ (UIImage *)hm_imageNamed:(NSString *)name {
    return [UIImage imageNamed:name
                      inBundle:[NSBundle hm_emoticonBundle]
 compatibleWithTraitCollection:nil];
}
 
- (UIImage *)hm_resizableImage {
    return [self resizableImageWithCapInsets:
            UIEdgeInsetsMake(self.size.height * 0.5,
                             self.size.width * 0.5,
                             self.size.height * 0.5,
                             self.size.width * 0.5)];
}
 
@end