|
|
@@ -40,6 +40,7 @@
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
|
|
self = [super initWithFrame:frame];
|
|
|
|
self = [super initWithFrame:frame];
|
|
|
|
if (self) {
|
|
|
|
if (self) {
|
|
|
|
|
|
|
|
[self addNotification];
|
|
|
|
[self initSubViews];
|
|
|
|
[self initSubViews];
|
|
|
|
[self initSubViewConstraints];
|
|
|
|
[self initSubViewConstraints];
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -61,7 +62,7 @@
|
|
|
|
[self addSubview:self.failLabel];
|
|
|
|
[self addSubview:self.failLabel];
|
|
|
|
[self addSubview:self.stackView];
|
|
|
|
[self addSubview:self.stackView];
|
|
|
|
[self.stackView addArrangedSubview:self.cancelButton];
|
|
|
|
[self.stackView addArrangedSubview:self.cancelButton];
|
|
|
|
[self.stackView addArrangedSubview:self.confirmButton];
|
|
|
|
[self.stackView addArrangedSubview:self.confirmButton];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)initSubViewConstraints {
|
|
|
|
- (void)initSubViewConstraints {
|
|
|
@@ -100,6 +101,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - Event Response
|
|
|
|
#pragma mark - Event Response
|
|
|
|
- (void)cancelButtonAction:(UIButton *)sender {
|
|
|
|
- (void)cancelButtonAction:(UIButton *)sender {
|
|
|
|
|
|
|
|
[self resignFirstResponder];
|
|
|
|
[TTPopup dismiss];
|
|
|
|
[TTPopup dismiss];
|
|
|
|
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickCancel:)]) {
|
|
|
|
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickCancel:)]) {
|
|
|
|
[self.delegate didClickCancel:self.type];
|
|
|
|
[self.delegate didClickCancel:self.type];
|
|
|
@@ -195,6 +197,8 @@
|
|
|
|
NSAttributedString * attribute = [[NSAttributedString alloc] initWithString:_placeHolder attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17],NSForegroundColorAttributeName: [DJDKMIMOMColor secondTextColor]}];
|
|
|
|
NSAttributedString * attribute = [[NSAttributedString alloc] initWithString:_placeHolder attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17],NSForegroundColorAttributeName: [DJDKMIMOMColor secondTextColor]}];
|
|
|
|
self.contentTextField.attributedText = attribute;
|
|
|
|
self.contentTextField.attributedText = attribute;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[self updateCount:placeHolder.length];
|
|
|
|
|
|
|
|
[self.contentTextField becomeFirstResponder];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)setIsPwdError:(BOOL)isPwdError {
|
|
|
|
- (void)setIsPwdError:(BOOL)isPwdError {
|
|
|
|