/
btSimplePopUP.h
74 lines (57 loc) · 2.19 KB
/
btSimplePopUP.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// btSimplePopUP.h
// btCustomPopUP
//
// Created by Balram Tiwari on 02/06/14.
// Copyright (c) 2014 Balram Tiwari. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <Accelerate/Accelerate.h>
typedef NS_ENUM(NSInteger, BTPopUpStyle) {
BTPopUpStyleDefault,
BTPopUpStyleMinimalRoundedCorner
};
typedef NS_ENUM(NSInteger, BTPopUpAnimation) {
BTPopUPAnimateWithFade,
BTPopUPAnimateNone
};
typedef NS_ENUM(NSInteger, BTPopUpBorderStyle) {
BTPopUpBorderStyleDefaultNone,
BTPopUpBorderStyleLightContent,
BTPopUpBorderStyleDarkContent
};
@class btSimplePopUP;
@protocol btSimplePopUpDelegate <NSObject>
@optional
-(void)btSimplePopUP:(btSimplePopUP *)popUp didSelectItemAtIndex:(NSInteger)index;
@end
@interface btSimplePopUP : UIView <UIScrollViewDelegate>{
UIImageView *backGroundBlurr;
UIView *contentView;
CGSize itemSize;
UIColor *itemColor, *itemTextColor, *highlightColor, *backgroundColor;
UIFont *itemFont;
NSArray *popItems;
UIScrollView *scrollView;
UIPageControl * pageControl;
}
@property (nonatomic, assign) BTPopUpStyle popUpStyle;
@property (nonatomic, assign) BTPopUpBorderStyle popUpBorderStyle;
@property (nonatomic, assign) UIColor *popUpBackgroundColor;
@property (nonatomic, assign) BTPopUpAnimation animationStyle;
@property(nonatomic, weak) id <btSimplePopUpDelegate> delegate;
@property (nonatomic) BOOL setShowRipples;
-(instancetype)initWithItemImage:(NSArray *)items andActionArray:(NSArray *)actionArray addToViewController:(UIViewController*)sender;
-(instancetype)initWithItemImage:(NSArray *)items andTitles:(NSArray *)titleArray andActionArray:(NSArray *)actionArray addToViewController:(UIViewController*)sender;
-(instancetype)initWithItemImage:(NSArray *)items andTitles:(NSArray *)titleArray addToViewController:(UIViewController*)sender;
-(void)setPopUpBackgroundColor:(UIColor *)popUpBackgroundColor;
-(void)show:(BTPopUpAnimation)animation;
-(void)dismiss;
@end
@interface UIView (bt_screenshot)
- (UIImage *)screenshot;
@end
@interface UIImage (bt_blurrEffect)
- (UIImage *)blurredImageWithRadius:(CGFloat)radius iterations:(NSUInteger)iterations tintColor:(UIColor *)tintColor;
@end