12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // ASCheckoutCommentCell.m
- // Asteria
- //
- // Created by xingyu on 2024/5/10.
- //
- #import "ASCheckoutCommentCell.h"
- @implementation ASCheckoutCommentData
- @end
- @interface ASCheckoutCommentCell()<UITextFieldDelegate>
- @property (nonatomic, strong) TT_CustonTF *commentTF;
- @end
- @implementation ASCheckoutCommentCell
- - (void)setupSubviewS {
- self.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
-
- UIView *backView = [[UIView alloc] init];
- TT_ViewRadius(backView, 4);
- backView.backgroundColor = [UIColor whiteColor];
- [self.contentView addSubview:backView];
- [backView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.top.mas_equalTo(10);
- make.right.mas_equalTo(-10);
- make.bottom.mas_equalTo(0);
- }];
-
- UILabel *titleLab = [UILabel labelCreateWithText:@"Comment" font:[UIFont fontWithName:Rob_Bold size:16] textColor:Col_000];
- [backView addSubview:titleLab];
- [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.top.mas_equalTo(20);
- }];
-
- [backView addSubview:self.commentTF];
- [self.commentTF mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.right.mas_equalTo(-10);
- make.top.equalTo(titleLab.mas_bottom).offset(20);
- make.height.mas_equalTo(45);
- make.bottom.mas_equalTo(-20);
- }];
-
- }
- - (void)textFieldDidEndEditing:(UITextField *)textField {
- self.commentData.commentStr = textField.text;
- if(self.currencyparameterClose){
- self.currencyparameterClose(0,self.commentData);
- }
- }
- -(TT_CustonTF *)commentTF{
- if(!_commentTF){
- _commentTF = [[TT_CustonTF alloc] init];
- _commentTF.delegate = self;
- _commentTF.placeholder = @"Fill in your message";
- _commentTF.font = [UIFont fontWithName:Rob_Regular size:14];
- _commentTF.textColor = Col_000;
- TT_ViewBorderRadius(_commentTF, 4, 1, Col_666);
- }
- return _commentTF;
- }
- @end
|