add files apis
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created by lianxiang on 2018/8/14.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
//弹幕评论视图
|
||||
|
||||
#import "GiGaCommentView.h"
|
||||
#import "Masonry.h"
|
||||
@@ -81,8 +81,7 @@
|
||||
|
||||
make.top.mas_equalTo(self.userAvtar.mas_bottom).mas_offset(3);
|
||||
make.left.mas_equalTo(self.mas_left).mas_offset(5);
|
||||
|
||||
|
||||
|
||||
}];
|
||||
|
||||
float width = msglabel.frame.size.width > namelabel.frame.size.width ? msglabel.frame.size.width:namelabel.frame.size.width ;
|
||||
|
||||
@@ -19,10 +19,9 @@
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
|
||||
// self.backgroundColor = [UIColor blackColor];
|
||||
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
|
||||
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
|
||||
// [self addGestureRecognizer:tap];
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
|
||||
[self addGestureRecognizer:tap];
|
||||
|
||||
[self creatInputView];
|
||||
[self bringSubviewToFront:_commitInputView];
|
||||
@@ -54,6 +53,7 @@
|
||||
textField.backgroundColor = [UIColor lightGrayColor];
|
||||
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
textField.delegate = self;
|
||||
textField.returnKeyType = UIReturnKeySend;
|
||||
[commitView addSubview:textField];
|
||||
self.inputTextField = textField;
|
||||
|
||||
@@ -71,7 +71,8 @@
|
||||
}
|
||||
|
||||
-(void)dismissSelfViewTap{
|
||||
[self removeFromSuperview];
|
||||
//[self removeFromSuperview];
|
||||
[self.inputTextField resignFirstResponder];
|
||||
}
|
||||
|
||||
-(void)sendBtnAction:(UIButton *)btn{
|
||||
@@ -95,7 +96,8 @@
|
||||
self.SendCommentHandler(self.inputTextField.text);
|
||||
}
|
||||
|
||||
[self dismissKeyboard];
|
||||
if (![self.inputTextField isFirstResponder]) return;
|
||||
[self dismissKeyboard];
|
||||
|
||||
}
|
||||
|
||||
@@ -138,7 +140,6 @@
|
||||
// get a rect for the textView frame
|
||||
CGRect commentInputViewFrame = self.commitInputView.frame;
|
||||
commentInputViewFrame.origin.y = self.bounds.size.height - (keyboardBounds.size.height + commentInputViewFrame.size.height);
|
||||
|
||||
// animations settings
|
||||
[UIView beginAnimations:nil context:NULL];
|
||||
[UIView setAnimationBeginsFromCurrentState:YES];
|
||||
@@ -147,7 +148,6 @@
|
||||
|
||||
// set views with new info
|
||||
self.commitInputView.frame = commentInputViewFrame;
|
||||
|
||||
[UIView commitAnimations];
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user