-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGradientButton.h
52 lines (45 loc) · 1.64 KB
/
GradientButton.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
//
// ButtonGradientView.h
// Custom Alert View
//
// Created by jeff on 5/17/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <CoreGraphics/CoreGraphics.h>
@interface GradientButton : UIButton
{
// These two arrays define the gradient that will be used
// when the button is in UIControlStateNormal
NSArray *normalGradientColors; // Colors
NSArray *normalGradientLocations; // Relative locations
// These two arrays define the gradient that will be used
// when the button is in UIControlStateHighlighted
NSArray *highlightGradientColors; // Colors
NSArray *highlightGradientLocations; // Relative locations
// This defines the corner radius of the button
CGFloat cornerRadius;
// This defines the size and color of the stroke
CGFloat strokeWeight;
UIColor *strokeColor;
@private
CGGradientRef normalGradient;
CGGradientRef highlightGradient;
}
@property (nonatomic, retain) NSArray *normalGradientColors;
@property (nonatomic, retain) NSArray *normalGradientLocations;
@property (nonatomic, retain) NSArray *highlightGradientColors;
@property (nonatomic, retain) NSArray *highlightGradientLocations;
@property (nonatomic) CGFloat cornerRadius;
@property (nonatomic) CGFloat strokeWeight;
@property (nonatomic, retain) UIColor *strokeColor;
- (void)useAlertStyle;
- (void)useRedDeleteStyle;
- (void)useWhiteStyle;
- (void)useBlackStyle;
- (void)useWhiteActionSheetStyle;
- (void)useBlackActionSheetStyle;
- (void)useSimpleOrangeStyle;
- (void)useGreenConfirmStyle;
@end