-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIImageViewAligned.h
executable file
·49 lines (35 loc) · 1.59 KB
/
UIImageViewAligned.h
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
49
//
// UIImageViewAligned.h
// awards
//
// Created by Andrei Stanescu on 7/29/13.
//
#import <UIKit/UIKit.h>
typedef enum
{
UIImageViewAlignmentMaskCenter = 0,
UIImageViewAlignmentMaskLeft = 1,
UIImageViewAlignmentMaskRight = 2,
UIImageViewAlignmentMaskTop = 4,
UIImageViewAlignmentMaskBottom = 8,
UIImageViewAlignmentMaskBottomLeft = UIImageViewAlignmentMaskBottom | UIImageViewAlignmentMaskLeft,
UIImageViewAlignmentMaskBottomRight = UIImageViewAlignmentMaskBottom | UIImageViewAlignmentMaskRight,
UIImageViewAlignmentMaskTopLeft = UIImageViewAlignmentMaskTop | UIImageViewAlignmentMaskLeft,
UIImageViewAlignmentMaskTopRight = UIImageViewAlignmentMaskTop | UIImageViewAlignmentMaskRight,
}UIImageViewAlignmentMask;
typedef UIImageViewAlignmentMask UIImageViewAignmentMask __attribute__((deprecated("Use UIImageViewAlignmentMask. Use of UIImageViewAignmentMask (misspelled) is deprecated.")));
@interface UIImageViewAligned : UIImageView
// This property holds the current alignment
@property (nonatomic) UIImageViewAlignmentMask alignment;
// Properties needed for Interface Builder quick setup
@property (nonatomic) BOOL alignLeft;
@property (nonatomic) BOOL alignRight;
@property (nonatomic) BOOL alignTop;
@property (nonatomic) BOOL alignBottom;
// Make the UIImageView scale only up or down
// This are used only if the content mode is Scaled
@property (nonatomic) BOOL enableScaleUp;
@property (nonatomic) BOOL enableScaleDown;
// Just in case you need access to the inner image view
@property (nonatomic, readonly) UIImageView* realImageView;
@end