2
0
Quellcode durchsuchen

评论朋友圈

桂欢 vor 2 Jahren
Ursprung
Commit
fd819fa25d

+ 7 - 1
SLAiELTS/SLAiELTS.xcodeproj/project.pbxproj

@@ -118,6 +118,7 @@
 		3D2DC3F129B191C80041A729 /* MessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D2DC3F029B191C80041A729 /* MessageModel.m */; };
 		3D2DC3F429B1E6320041A729 /* SLMikeInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D2DC3F329B1E6320041A729 /* SLMikeInputView.m */; };
 		3D2DC3F629B1E6510041A729 /* SLMikeInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D2DC3F529B1E6510041A729 /* SLMikeInputView.xib */; };
+		3D5BC38B29E3E77400748197 /* SLMoentsChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D5BC38A29E3E77400748197 /* SLMoentsChatView.m */; };
 		3D796C6C29B8305C00B7B28A /* NSObject+FBKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D796C6929B8305C00B7B28A /* NSObject+FBKVOController.m */; };
 		3D796C6D29B8305C00B7B28A /* FBKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D796C6A29B8305C00B7B28A /* FBKVOController.m */; };
 		3D8515D729CD92A400418BAB /* JXCategoryTitleBackgroundCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8515D129CD92A400418BAB /* JXCategoryTitleBackgroundCellModel.m */; };
@@ -442,6 +443,8 @@
 		3D2DC3F229B1E6320041A729 /* SLMikeInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLMikeInputView.h; sourceTree = "<group>"; };
 		3D2DC3F329B1E6320041A729 /* SLMikeInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLMikeInputView.m; sourceTree = "<group>"; };
 		3D2DC3F529B1E6510041A729 /* SLMikeInputView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SLMikeInputView.xib; sourceTree = "<group>"; };
+		3D5BC38929E3E77400748197 /* SLMoentsChatView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLMoentsChatView.h; sourceTree = "<group>"; };
+		3D5BC38A29E3E77400748197 /* SLMoentsChatView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLMoentsChatView.m; sourceTree = "<group>"; };
 		3D796C6729B8305C00B7B28A /* KVOController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KVOController.h; sourceTree = "<group>"; };
 		3D796C6829B8305C00B7B28A /* FBKVOController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBKVOController.h; sourceTree = "<group>"; };
 		3D796C6929B8305C00B7B28A /* NSObject+FBKVOController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+FBKVOController.m"; sourceTree = "<group>"; };
@@ -1390,6 +1393,8 @@
 				3DB97D3429D6A86D00B12754 /* Cell */,
 				3DB97D3729D6A86D00B12754 /* TimeLineRefreshHeader */,
 				3DB97D3A29D6A86D00B12754 /* PhotoContainer */,
+				3D5BC38929E3E77400748197 /* SLMoentsChatView.h */,
+				3D5BC38A29E3E77400748197 /* SLMoentsChatView.m */,
 			);
 			path = Views;
 			sourceTree = "<group>";
@@ -1451,8 +1456,8 @@
 		3DB97D3A29D6A86D00B12754 /* PhotoContainer */ = {
 			isa = PBXGroup;
 			children = (
-				3DB97D3B29D6A86D00B12754 /* SDWeiXinPhotoContainerView.m */,
 				3DB97D3C29D6A86D00B12754 /* SDWeiXinPhotoContainerView.h */,
+				3DB97D3B29D6A86D00B12754 /* SDWeiXinPhotoContainerView.m */,
 			);
 			path = PhotoContainer;
 			sourceTree = "<group>";
@@ -2025,6 +2030,7 @@
 				3D2DC3DF29B0991E0041A729 /* YMIMHintView.m in Sources */,
 				3DA2C73C29CBE4DD0087CDB4 /* SLRoleappearanceView.m in Sources */,
 				3DF3DAAD29B9AA3400CAD3AB /* SLMyListCollectionViewCell.m in Sources */,
+				3D5BC38B29E3E77400748197 /* SLMoentsChatView.m in Sources */,
 				3D9961FA29CD2EFE0076DBD1 /* SLNestViewController.m in Sources */,
 				3D1B987E29BEEA5A0008D01A /* SLVocabularyView.m in Sources */,
 			);

+ 22 - 0
SLAiELTS/SLAiELTS/Assets.xcassets/Moents/icon_moents_right_arrow.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "icon_moents_right_arrow@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "icon_moents_right_arrow@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
SLAiELTS/SLAiELTS/Assets.xcassets/Moents/icon_moents_right_arrow.imageset/icon_moents_right_arrow@2x.png


BIN
SLAiELTS/SLAiELTS/Assets.xcassets/Moents/icon_moents_right_arrow.imageset/icon_moents_right_arrow@3x.png


+ 2 - 1
SLAiELTS/SLAiELTS/Tool/SDPhotoBrowser/SDPhotoBrowser.m

@@ -82,6 +82,7 @@
     [saveButton addTarget:self action:@selector(saveImage) forControlEvents:UIControlEventTouchUpInside];
     _saveButton = saveButton;
     [self addSubview:saveButton];
+//    self.backgroundColor = [UIColor yellowColor];
 }
 
 - (void)saveImage
@@ -248,7 +249,7 @@
         [self showFirstImage];
     }
     
-    _indexLabel.center = CGPointMake(self.bounds.size.width * 0.5, 35);
+    _indexLabel.center = CGPointMake(self.bounds.size.width * 0.5, kNavBarHeight / 1.5);
     _saveButton.frame = CGRectMake(30, self.bounds.size.height - 70, 50, 25);
 }
 

+ 67 - 80
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SDTimeLineTableViewController.m

@@ -41,18 +41,20 @@
 #import "UIView+SDAutoLayout.h"
 #import "LEETheme.h"
 #import "GlobalDefines.h"
+#import "SLMoentsChatView.h"
 
 #define kTimeLineTableViewCellId @"SDTimeLineCell"
 
-static CGFloat textFieldH = 40;
+static CGFloat textFieldH = 56;
 
-@interface SDTimeLineTableViewController () <SDTimeLineCellDelegate, UITextFieldDelegate>
+@interface SDTimeLineTableViewController () <SDTimeLineCellDelegate, UITextFieldDelegate, Delegates>
 
-@property (nonatomic, strong) UITextField *textField;
+@property (nonatomic, strong) UITextView *textField;
 @property (nonatomic, assign) BOOL isReplayingComment;
 @property (nonatomic, strong) NSIndexPath *currentEditingIndexthPath;
 @property (nonatomic, copy) NSString *commentToUser;
 
+@property (nonatomic, strong) SLMoentsChatView *moentsChatView;
 @end
 
 @implementation SDTimeLineTableViewController
@@ -128,7 +130,7 @@ static CGFloat textFieldH = 40;
 
     [self.tableView registerClass:[SDTimeLineCell class] forCellReuseIdentifier:kTimeLineTableViewCellId];
 
-    [self setupTextField];
+    
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardNotification:) name:UIKeyboardWillChangeFrameNotification object:nil];
 }
@@ -136,7 +138,7 @@ static CGFloat textFieldH = 40;
 - (void)viewDidAppear:(BOOL)animated
 {
     [super viewDidAppear:animated];
-
+    [self setupTextField];
     if (!_refreshHeader.superview) {
         
         _refreshHeader = [SDTimeLineRefreshHeader refreshHeaderWithCenter:CGPointMake(40, 45)];
@@ -163,6 +165,11 @@ static CGFloat textFieldH = 40;
     [_textField resignFirstResponder];
 }
 
+- (void)viewDidDisappear:(BOOL)animated {
+    [super viewDidDisappear:animated];
+    [_moentsChatView removeFromSuperview];
+}
+
 - (void)dealloc
 {
     [_refreshHeader removeFromSuperview];
@@ -174,40 +181,41 @@ static CGFloat textFieldH = 40;
 
 - (void)setupTextField
 {
-    _textField = [UITextField new];
-    _textField.returnKeyType = UIReturnKeyDone;
-    _textField.delegate = self;
-    _textField.layer.borderColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.8].CGColor;
-    _textField.layer.borderWidth = 1;
-    
-    //为textfield添加背景颜色 字体颜色的设置 还有block设置 , 在block中改变它的键盘样式 (当然背景颜色和字体颜色也可以直接在block中写)
+    self.moentsChatView = [[SLMoentsChatView alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height, self.view.width_sd, textFieldH)];
+    self.moentsChatView.backgroundColor = SLColor(@"#F5F5F5");
+    [[UIApplication sharedApplication].keyWindow addSubview:self.moentsChatView];
     
-    _textField.lee_theme
-    .LeeAddBackgroundColor(DAY , [UIColor whiteColor])
-    .LeeAddBackgroundColor(NIGHT , [UIColor blackColor])
-    .LeeAddTextColor(DAY , [UIColor blackColor])
-    .LeeAddTextColor(NIGHT , [UIColor grayColor])
-    .LeeAddCustomConfig(DAY , ^(UITextField *item){
+    _textField = self.moentsChatView.nextGrowingTextView.textView;
+    _textField.returnKeyType = UIReturnKeyDone;
+    self.moentsChatView.nextGrowingTextView.delegates = self;
+    WS(weakSelf);
+    self.moentsChatView.sendTextBlock = ^(NSString * _Nonnull text) {
+        [weakSelf.textField resignFirstResponder];
+        [weakSelf.view endEditing:YES];
+        SDTimeLineCellModel *model = weakSelf.dataArray[weakSelf.currentEditingIndexthPath.row];
+        NSMutableArray *temp = [NSMutableArray new];
+        [temp addObjectsFromArray:model.commentItemsArray];
+        SDTimeLineCellCommentItemModel *commentItemModel = [SDTimeLineCellCommentItemModel new];
         
-        item.keyboardAppearance = UIKeyboardAppearanceDefault;
-        if ([item isFirstResponder]) {
-            [item resignFirstResponder];
-            [item becomeFirstResponder];
+        if (weakSelf.isReplayingComment) {
+            commentItemModel.firstUserName = @"GSD_iOS";
+            commentItemModel.firstUserId = @"GSD_iOS";
+            commentItemModel.secondUserName = weakSelf.commentToUser;
+            commentItemModel.secondUserId = weakSelf.commentToUser;
+            commentItemModel.commentString = text;
+            
+            weakSelf.isReplayingComment = NO;
+        } else {
+            commentItemModel.firstUserName = @"GSD_iOS";
+            commentItemModel.commentString = text;
+            commentItemModel.firstUserId = @"GSD_iOS";
         }
-    }).LeeAddCustomConfig(NIGHT , ^(UITextField *item){
+        [temp addObject:commentItemModel];
+        model.commentItemsArray = [temp copy];
+        [weakSelf.tableView reloadRowsAtIndexPaths:@[weakSelf.currentEditingIndexthPath] withRowAnimation:UITableViewRowAnimationNone];
         
-        item.keyboardAppearance = UIKeyboardAppearanceDark;
-        if ([item isFirstResponder]) {
-            [item resignFirstResponder];
-            [item becomeFirstResponder];
-        }
-    });
-    
-    _textField.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height, self.view.width_sd, textFieldH);
-    [[UIApplication sharedApplication].keyWindow addSubview:_textField];
-    
-    [_textField becomeFirstResponder];
-    [_textField resignFirstResponder];
+        weakSelf.textField.text = @"";
+    };
 }
 
 // 右栏目按钮点击事件
@@ -349,7 +357,7 @@ static CGFloat textFieldH = 40;
         }];
         
         [cell setDidClickCommentLabelBlock:^(NSString *commentId, CGRect rectInWindow, NSIndexPath *indexPath) {
-            weakSelf.textField.placeholder = [NSString stringWithFormat:@"  回复:%@", commentId];
+//            weakSelf.textField.placeholder = [NSString stringWithFormat:@"  回复:%@", commentId];
             weakSelf.currentEditingIndexthPath = indexPath;
             [weakSelf.textField becomeFirstResponder];
             weakSelf.isReplayingComment = YES;
@@ -385,7 +393,7 @@ static CGFloat textFieldH = 40;
 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
 {
     [_textField resignFirstResponder];
-    _textField.placeholder = nil;
+//    _textField.placeholder = nil;
 }
 
 
@@ -466,59 +474,18 @@ static CGFloat textFieldH = 40;
     [self.tableView setContentOffset:offset animated:YES];
 }
 
-#pragma mark - UITextFieldDelegate
-
-- (BOOL)textFieldShouldReturn:(UITextField *)textField
-{
-    if (textField.text.length) {
-        [_textField resignFirstResponder];
-        
-        SDTimeLineCellModel *model = self.dataArray[_currentEditingIndexthPath.row];
-        NSMutableArray *temp = [NSMutableArray new];
-        [temp addObjectsFromArray:model.commentItemsArray];
-        SDTimeLineCellCommentItemModel *commentItemModel = [SDTimeLineCellCommentItemModel new];
-        
-        if (self.isReplayingComment) {
-            commentItemModel.firstUserName = @"GSD_iOS";
-            commentItemModel.firstUserId = @"GSD_iOS";
-            commentItemModel.secondUserName = self.commentToUser;
-            commentItemModel.secondUserId = self.commentToUser;
-            commentItemModel.commentString = textField.text;
-            
-            self.isReplayingComment = NO;
-        } else {
-            commentItemModel.firstUserName = @"GSD_iOS";
-            commentItemModel.commentString = textField.text;
-            commentItemModel.firstUserId = @"GSD_iOS";
-        }
-        [temp addObject:commentItemModel];
-        model.commentItemsArray = [temp copy];
-        [self.tableView reloadRowsAtIndexPaths:@[_currentEditingIndexthPath] withRowAnimation:UITableViewRowAnimationNone];
-        
-        _textField.text = @"";
-        _textField.placeholder = nil;
-        
-        return YES;
-    }
-    return NO;
-}
-
-
-
 - (void)keyboardNotification:(NSNotification *)notification
 {
     NSDictionary *dict = notification.userInfo;
     CGRect rect = [dict[@"UIKeyboardFrameEndUserInfoKey"] CGRectValue];
-    
-    
-    
+        
     CGRect textFieldRect = CGRectMake(0, rect.origin.y - textFieldH, rect.size.width, textFieldH);
     if (rect.origin.y == [UIScreen mainScreen].bounds.size.height) {
         textFieldRect = rect;
     }
     
     [UIView animateWithDuration:0.25 animations:^{
-        _textField.frame = textFieldRect;
+        self.moentsChatView.frame = textFieldRect;
     }];
     
     CGFloat h = rect.size.height + textFieldH;
@@ -528,4 +495,24 @@ static CGFloat textFieldH = 40;
     }
 }
 
+- (void)willChangeHeight:(CGFloat)height
+{
+    [self bottomChangeHeight:height];
+}
+
+- (void)didChangeHeight:(CGFloat)height
+{
+    [self bottomChangeHeight:height];
+}
+
+- (void)bottomChangeHeight:(CGFloat)height
+{
+    CGRect rect = self.moentsChatView.frame;
+    CGFloat h = MAX(height + 16, 56);
+    rect.origin.y = rect.origin.y - (h - rect.size.height);
+    rect.size.height = h;
+    self.moentsChatView.frame = rect;
+    [self.moentsChatView setNeedsDisplay];
+}
+
 @end

+ 46 - 3
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/HeaderView/SDTimeLineTableHeaderView.m

@@ -39,6 +39,7 @@
     UIImageView *_iconView;
     UILabel *_nameLabel;
     UIButton *_creatBtn;
+    UIScrollView *_interestcrollView;
 }
 
 - (instancetype)initWithFrame:(CGRect)frame
@@ -52,7 +53,7 @@
 - (void)setup
 {
     _backgroundImageView = [UIImageView new];
-    _backgroundImageView.image = ImageName(@"icon_home_gp");
+    _backgroundImageView.image = ImageName(@"icon_home_zysj");
     _backgroundImageView.userInteractionEnabled = YES;
     [self addSubview:_backgroundImageView];
     
@@ -72,13 +73,43 @@
     [_creatBtn addTarget:self action:@selector(creatBtnClick) forControlEvents:UIControlEventTouchUpInside];
     [self addSubview:_creatBtn];
     
+    _interestcrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
+    _interestcrollView.bounces = NO;
+    _interestcrollView.showsVerticalScrollIndicator = NO;
+    _interestcrollView.showsHorizontalScrollIndicator = NO;
+//    _interestcrollView.backgroundColor = [UIColor yellowColor];
+    [self addSubview:_interestcrollView];
+    
+    NSMutableArray *marr = [NSMutableArray arrayWithArray:@[@"运动",@"运动",@"运动",@"运动"]];
+    [marr enumerateObjectsUsingBlock:^(NSString *obj, NSUInteger idx, BOOL * _Nonnull stop) {
+        UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
+        label.text = obj;
+        label.frame = CGRectMake(60 * idx, 0, 48, 26);
+        label.textColor = [UIColor whiteColor];
+        label.font = [UIFont systemFontOfSize:10];
+        label.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.3];
+        label.layer.cornerRadius = 13.0;
+        label.textAlignment = NSTextAlignmentCenter;
+        label.clipsToBounds = YES;
+        [_interestcrollView addSubview:label];
+    }];
+    
+    UIButton *moreInterestBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    [moreInterestBtn setImage:ImageName(@"icon_moents_right_arrow") forState:UIControlStateNormal];
+    WS(weakSelf);
+    [moreInterestBtn handleEvent:UIControlEventTouchUpInside withBlock:^{
+            
+    }];
+    [self addSubview:moreInterestBtn];
+    
+    
     _backgroundImageView.sd_layout.spaceToSuperView(UIEdgeInsetsMake(-60, 0, 40, 0));
     
     _iconView.sd_layout
     .widthIs(64)
     .heightIs(64)
     .leftSpaceToView(self, 16)
-    .bottomSpaceToView(self, 54);
+    .bottomSpaceToView(self, 94);
     
     
     _nameLabel.tag = 1000;
@@ -88,11 +119,23 @@
     .centerYEqualToView(_iconView)
     .heightIs(24);
     
+    _interestcrollView.sd_layout
+    .heightIs(26)
+    .leftSpaceToView(self, 16)
+    .rightSpaceToView(self, 50)
+    .bottomSpaceToView(self, 54);
+    
     _creatBtn.sd_layout
     .widthIs(36)
     .heightIs(36)
     .rightSpaceToView(self, 12)
     .topSpaceToView(self, 12);
+    
+    moreInterestBtn.sd_layout
+    .widthIs(26)
+    .heightIs(26)
+    .rightSpaceToView(self, 12)
+    .centerYEqualToView(_interestcrollView);
 }
 
 - (void)creatBtnClick {
@@ -104,7 +147,7 @@
             case 2:
             {
                 SLCreatMomentsVc *vc = [SLCreatMomentsVc loadViewControllewWithNib];
-                [self.viewController.rdv_tabBarController.navigationController pushViewController:vc animated:YES];
+                [weakSelf.viewController.rdv_tabBarController.navigationController pushViewController:vc animated:YES];
             }
                 break;
             default:

+ 25 - 0
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/SLMoentsChatView.h

@@ -0,0 +1,25 @@
+//
+//  SLMoentsChatView.h
+//  SLAiELTS
+//
+//  Created by Gusont on 2023/4/10.
+//
+
+#import <UIKit/UIKit.h>
+#import "YMNextGrowingTextView.h"
+
+NS_ASSUME_NONNULL_BEGIN
+typedef void(^SLMoentsChatBlock)(NSString *text);
+
+@interface SLMoentsChatView : UIView
+
+@property (nonatomic, strong) YMNextGrowingTextView *nextGrowingTextView;
+
+@property (nonatomic, copy) SLMoentsChatBlock sendTextBlock;
+
+@property (nonatomic, copy) SLMoentsChatBlock hintBtnBlock;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 103 - 0
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/SLMoentsChatView.m

@@ -0,0 +1,103 @@
+//
+//  SLMoentsChatView.m
+//  SLAiELTS
+//
+//  Created by Gusont on 2023/4/10.
+//
+
+#import "SLMoentsChatView.h"
+
+@interface SLMoentsChatView()
+
+@property (nonatomic, strong) UIButton *rightSendBtn;
+
+@property (nonatomic, strong) UIView *textBgView;
+
+@end
+
+
+@implementation SLMoentsChatView
+
+static const NSInteger btnTag = 20000;
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self confignUI];
+    }
+    return self;
+}
+
+- (void)confignUI
+{
+    self.backgroundColor = [[UIColor colorFormString:@"#273F66"] colorWithAlphaComponent:0.3];
+    [self.textBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self);
+    }];
+
+    [self.rightSendBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.equalTo(self.textBgView);
+        make.right.equalTo(self.textBgView.mas_right).offset(-12 * KScaleW);
+        make.width.mas_equalTo(64);
+        make.height.mas_equalTo(32);
+    }];
+    
+    [self.nextGrowingTextView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(24);
+        make.centerY.equalTo(self.textBgView).priority(500);
+        make.top.greaterThanOrEqualTo(self.textBgView).offset(8).priority(1000);
+        make.right.equalTo(self.rightSendBtn.mas_left).offset(-12);
+    }];
+}
+
+- (void)btnClick:(UIButton *)btn
+{
+    switch (btn.tag - btnTag) {
+        case 2:
+            if (self.sendTextBlock) {
+                self.sendTextBlock(self.nextGrowingTextView.textView.text);
+            }
+            break;
+        default:
+            break;
+    }
+}
+
+- (UIButton *)rightSendBtn
+{
+    if (!_rightSendBtn) {
+        _rightSendBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        _rightSendBtn.titleLabel.font = [UIFont systemFontOfSize:16];
+        [_rightSendBtn setTitleColor:SL333Color forState:UIControlStateNormal];
+        [_rightSendBtn setTitle:@"评论" forState:UIControlStateNormal];
+        [_rightSendBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+        _rightSendBtn.tag = btnTag + 2;
+        [self.textBgView addSubview:_rightSendBtn];
+    }
+    return _rightSendBtn;
+}
+
+- (YMNextGrowingTextView *)nextGrowingTextView
+{
+    if (!_nextGrowingTextView) {
+        _nextGrowingTextView = [[YMNextGrowingTextView alloc] initWithFrame:CGRectMake(0, 0, kSCREEN_WIDTH - 160, 40)];
+        _nextGrowingTextView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:1];
+        _nextGrowingTextView.placeholderAttributedText = [[NSAttributedString alloc] initWithString:@"请输入关键词" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 16], NSForegroundColorAttributeName : [UIColor whiteColor]}];
+        _nextGrowingTextView.layer.cornerRadius = 4.0;
+        _nextGrowingTextView.maxNumberOfLines = 6;
+        [self.textBgView addSubview:_nextGrowingTextView];
+    }
+    return _nextGrowingTextView;
+}
+
+- (UIView *)textBgView
+{
+    if (!_textBgView) {
+        _textBgView = [[UIView alloc] initWithFrame:CGRectZero];
+        [self addSubview:_textBgView];
+    }
+    return _textBgView;
+}
+
+@end