Skip to content

Commit ee15be3

Browse files
author
费凯峰
committed
Modify the wrong character
1 parent bd911bb commit ee15be3

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

TYAlertControllerDemo/TYAlertController/TYAlertView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ typedef NS_ENUM(NSUInteger, TYAlertActionStyle) {
5959
@property (nonatomic, strong) UIFont *textFieldFont;
6060
@property (nonatomic, assign) CGFloat textFieldHeight;
6161
@property (nonatomic, assign) CGFloat textFieldEdge;
62-
@property (nonatomic, assign) CGFloat textFieldorderWidth;
62+
@property (nonatomic, assign) CGFloat textFieldBorderWidth;
6363
@property (nonatomic, assign) CGFloat textFieldContentViewEdge;
6464

6565

TYAlertControllerDemo/TYAlertController/TYAlertView.m

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ @interface TYAlertView ()
7676
#define kButtonSpace 6
7777
#define KButtonHeight 44
7878

79-
#define ktextFieldOffset 10000
80-
#define ktextFieldHeight 29
81-
#define ktextFieldEdge 8
82-
#define KtextFieldBorderWidth 0.5
79+
#define kTextFieldOffset 10000
80+
#define kTextFieldHeight 29
81+
#define kTextFieldEdge 8
82+
#define KTextFieldBorderWidth 0.5
8383

8484

8585
@implementation TYAlertView
@@ -131,14 +131,14 @@ - (void)configureProperty
131131
_buttonSpace = kButtonSpace;
132132
_buttonContentViewEdge = kContentViewEdge;
133133
_buttonCornerRadius = 4.0;
134-
_buttonFont = [UIFont fontWithName:@"HelveticaNeue" size:18];;
134+
_buttonFont = [UIFont fontWithName:@"HelveticaNeue" size:18];
135135
_buttonDefaultBgColor = [UIColor colorWithRed:52/255.0 green:152/255.0 blue:219/255.0 alpha:1];
136136
_buttonCancelBgColor = [UIColor colorWithRed:127/255.0 green:140/255.0 blue:141/255.0 alpha:1];
137137
_buttonDestructiveBgColor = [UIColor colorWithRed:231/255.0 green:76/255.0 blue:60/255.0 alpha:1];
138138

139-
_textFieldHeight = ktextFieldHeight;
140-
_textFieldEdge = ktextFieldEdge;
141-
_textFieldorderWidth = KtextFieldBorderWidth;
139+
_textFieldHeight = kTextFieldHeight;
140+
_textFieldEdge = kTextFieldEdge;
141+
_textFieldBorderWidth = KTextFieldBorderWidth;
142142
_textFieldContentViewEdge = kContentViewEdge;
143143

144144
_textFieldBorderColor = [UIColor colorWithRed:203/255.0 green:203/255.0 blue:203/255.0 alpha:1];
@@ -240,7 +240,7 @@ - (void)addTextFieldWithConfigurationHandler:(void (^)(UITextField *textField))c
240240
}
241241

242242
UITextField *textField = [[UITextField alloc]init];
243-
textField.tag = ktextFieldOffset + _textFields.count;
243+
textField.tag = kTextFieldOffset + _textFields.count;
244244
textField.font = _textFieldFont;
245245
textField.translatesAutoresizingMaskIntoConstraints = NO;
246246

@@ -262,7 +262,7 @@ - (void)addTextFieldWithConfigurationHandler:(void (^)(UITextField *textField))c
262262
[_textFieldSeparateViews addObject:separateView];
263263
}
264264

265-
[self layouttextFields];
265+
[self layoutTextFields];
266266
}
267267

268268
- (NSArray *)textFieldArray
@@ -337,20 +337,20 @@ - (void)layoutButtons
337337
[_buttonContentView removeConstraintWithView:firstBtn attribute:NSLayoutAttributeRight];
338338
[_buttonContentView removeConstraintWithView:firstBtn attribute:NSLayoutAttributeBottom];
339339
[_buttonContentView removeConstraintWithView:secondBtn attribute:NSLayoutAttributeTop];
340-
[_buttonContentView addConstraintWithView:firstBtn topView:nil leftView:nil bottomView:0 rightView:_buttonContentView edgeInset:UIEdgeInsetsZero];
340+
[_buttonContentView addConstraintWithView:firstBtn topView:nil leftView:nil bottomView:nil rightView:_buttonContentView edgeInset:UIEdgeInsetsZero];
341341
[_buttonContentView addConstraintWithTopView:firstBtn toBottomView:secondBtn constant:_buttonSpace];
342342

343343
}
344344

345-
UIButton *lastSecondBtn = _buttons[_buttons.count-2];
345+
UIButton *lastSecondBtn = _buttons[_buttons.count - 2];
346346
[_buttonContentView removeConstraintWithView:lastSecondBtn attribute:NSLayoutAttributeBottom];
347347
[_buttonContentView addConstraintWithTopView:lastSecondBtn toBottomView:button constant:_buttonSpace];
348348
[_buttonContentView addConstraintWithView:button topView:nil leftView:_buttonContentView bottomView:_buttonContentView rightView:_buttonContentView edgeInset:UIEdgeInsetsZero];
349349
[_buttonContentView addConstraintEqualWithView:button widthToView:nil heightToView:lastSecondBtn];
350350
}
351351
}
352352

353-
- (void)layouttextFields
353+
- (void)layoutTextFields
354354
{
355355
UITextField *textField = _textFields.lastObject;
356356

@@ -359,24 +359,24 @@ - (void)layouttextFields
359359
_textFieldContentView.backgroundColor = _textFieldBackgroudColor;
360360
_textFieldContentView.layer.masksToBounds = YES;
361361
_textFieldContentView.layer.cornerRadius = 4;
362-
_textFieldContentView.layer.borderWidth = _textFieldorderWidth;
362+
_textFieldContentView.layer.borderWidth = _textFieldBorderWidth;
363363
_textFieldContentView.layer.borderColor = _textFieldBorderColor.CGColor;
364364
_textFieldTopConstraint.constant = -_contentViewSpace;
365-
[_textFieldContentView addConstraintToView:textField edgeInset:UIEdgeInsetsMake(_textFieldorderWidth, _textFieldEdge, -_textFieldorderWidth, -_textFieldEdge)];
365+
[_textFieldContentView addConstraintToView:textField edgeInset:UIEdgeInsetsMake(_textFieldBorderWidth, _textFieldEdge, -_textFieldBorderWidth, -_textFieldEdge)];
366366
[textField addConstraintWidth:0 height:_textFieldHeight];
367367
}else {
368368
// textField
369-
UITextField *lastSecondtextField = _textFields[_textFields.count - 2];
370-
[_textFieldContentView removeConstraintWithView:lastSecondtextField attribute:NSLayoutAttributeBottom];
371-
[_textFieldContentView addConstraintWithTopView:lastSecondtextField toBottomView:textField constant:_textFieldorderWidth];
372-
[_textFieldContentView addConstraintWithView:textField topView:nil leftView:_textFieldContentView bottomView:_textFieldContentView rightView:_textFieldContentView edgeInset:UIEdgeInsetsMake(0, _textFieldEdge, -_textFieldorderWidth, -_textFieldEdge)];
373-
[_textFieldContentView addConstraintEqualWithView:textField widthToView:nil heightToView:lastSecondtextField];
369+
UITextField *lastSecondTextField = _textFields[_textFields.count - 2];
370+
[_textFieldContentView removeConstraintWithView:lastSecondTextField attribute:NSLayoutAttributeBottom];
371+
[_textFieldContentView addConstraintWithTopView:lastSecondTextField toBottomView:textField constant:_textFieldBorderWidth];
372+
[_textFieldContentView addConstraintWithView:textField topView:nil leftView:_textFieldContentView bottomView:_textFieldContentView rightView:_textFieldContentView edgeInset:UIEdgeInsetsMake(0, _textFieldEdge, -_textFieldBorderWidth, -_textFieldEdge)];
373+
[_textFieldContentView addConstraintEqualWithView:textField widthToView:nil heightToView:lastSecondTextField];
374374

375375
// separateview
376376
UIView *separateView = _textFieldSeparateViews[_textFields.count - 2];
377377
[_textFieldContentView addConstraintWithView:separateView topView:nil leftView:_textFieldContentView bottomView:nil rightView:_textFieldContentView edgeInset:UIEdgeInsetsZero];
378378
[_textFieldContentView addConstraintWithTopView:separateView toBottomView:textField constant:0];
379-
[separateView addConstraintWidth:0 height:_textFieldorderWidth];
379+
[separateView addConstraintWidth:0 height:_textFieldBorderWidth];
380380
}
381381
}
382382

0 commit comments

Comments
 (0)