Skip to content

Commit 6d4b167

Browse files
committed
add buttonContentViewEdge;
1 parent a49f97d commit 6d4b167

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

TYAlertControllerDemo/TYAlertController/TYAlertView.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ typedef NS_ENUM(NSUInteger, TYAlertActionStyle) {
4747
@property (nonatomic, assign) CGFloat buttonHeight;
4848
@property (nonatomic, assign) CGFloat buttonSpace;
4949
@property (nonatomic, assign) CGFloat buttonContentViewEdge;
50+
@property (nonatomic, assign) CGFloat buttonContentViewTop;
5051
@property (nonatomic, assign) CGFloat buttonCornerRadius;
5152
@property (nonatomic, strong) UIFont *buttonFont;
5253
@property (nonatomic, strong) UIColor *buttonDefaultBgColor;

TYAlertControllerDemo/TYAlertController/TYAlertView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ - (void)configureProperty
130130
_buttonHeight = KButtonHeight;
131131
_buttonSpace = kButtonSpace;
132132
_buttonContentViewEdge = kContentViewEdge;
133+
_buttonContentViewTop = 0;
133134
_buttonCornerRadius = 4.0;
134135
_buttonFont = [UIFont fontWithName:@"HelveticaNeue" size:18];;
135136
_buttonDefaultBgColor = [UIColor colorWithRed:52/255.0 green:152/255.0 blue:219/255.0 alpha:1];
@@ -296,7 +297,7 @@ - (void)layoutContentViews
296297
// buttonContentView
297298
_buttonContentView.translatesAutoresizingMaskIntoConstraints = NO;
298299

299-
_buttonTopConstraint = [self addConstraintWithTopView:_textFieldContentView toBottomView:_buttonContentView constant:0];
300+
_buttonTopConstraint = [self addConstraintWithTopView:_textFieldContentView toBottomView:_buttonContentView constant:_buttonContentViewTop];
300301

301302
[self addConstraintWithView:_buttonContentView topView:nil leftView:self bottomView:self rightView:self edgeInset:UIEdgeInsetsMake(0, _buttonContentViewEdge, -_contentViewSpace, -_buttonContentViewEdge)];
302303
}

0 commit comments

Comments
 (0)