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
29
30
31
32
33
34
35
36
37
38
39
//
// JavenImages.m
// XFFruit
//
// Created by Jonathan on 16/3/3.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import "JavenImages.h"
@implementation JavenImages
static JavenImages *_instance;
+ (instancetype)shareInstance
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_instance = [[JavenImages alloc] init];
_instance.imageArr = [NSMutableArray array];
});
return _instance;
}
- (void)insertImages:(NSArray *)array {
for (UIImage *image in array) {
[_instance.imageArr addObject:image];
}
}
- (void)insertAImage:(UIImage *)image {
[_instance.imageArr addObject:image];
}
- (void)removeAllImage {
[_instance.imageArr removeAllObjects];
}
@end