-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIImageView+Gestures.m
48 lines (36 loc) · 1.03 KB
/
UIImageView+Gestures.m
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
40
41
42
43
44
45
46
47
48
//
// UIImageView+Gestures.m
// Shop-Menu
//
// Created by james.dunay on 11/5/14.
// Copyright (c) 2014 James.Dunay. All rights reserved.
//
#import "UIImageView+Gestures.h"
#import "UIImage+GestureImages.h"
@implementation UIImageView (Gestures)
+ ( UIImageView * )create:( Gesture )gesture withRepeatCount:( NSInteger )repeatCount{
UIImageView* imageView = [[UIImageView alloc] init];
imageView.contentMode = UIViewContentModeScaleAspectFill;
switch (gesture) {
case GestureDoubleTap:{
imageView.image = [UIImage doubleTapImage];
break;
}
case GestureSwipe:{
imageView.image = [UIImage swipeImage];
break;
}
case GestureTap:{
imageView.image = [UIImage tapImage];
break;
}
case GestureLongPress:{
imageView.image = [UIImage longPressImage];
break;
}
default:
break;
}
return imageView;
}
@end