fix
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "GiGaFlyingCommitInputView.h"
|
||||
static const CGFloat kInputViewH = 44.f;
|
||||
|
||||
@interface GiGaFlyingCommitInputView()<UITextFieldDelegate>
|
||||
@property(nonatomic,strong) UIView *commitInputView;
|
||||
@property(nonatomic,strong) UITextField * inputTextField;
|
||||
@@ -19,7 +21,7 @@
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
|
||||
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
|
||||
//self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
|
||||
[self addGestureRecognizer:tap];
|
||||
|
||||
@@ -32,28 +34,41 @@
|
||||
|
||||
-(void)creatInputView{
|
||||
|
||||
UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60)];
|
||||
// commitView.frame = CGRectMake(0, self.frame.size.height-commitView.frame.size.height, self.frame.size.width, commitView.frame.size.height);
|
||||
UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH)];
|
||||
|
||||
self.commitInputView = commitView;
|
||||
self.commitInputView.backgroundColor = [UIColor redColor];
|
||||
self.commitInputView.backgroundColor = GIGARGB(241, 241, 241, 1);
|
||||
[self addSubview:self.commitInputView];
|
||||
|
||||
UIButton *sendBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
CGFloat topMargin = 5;
|
||||
|
||||
CGFloat leftMargin = 10;
|
||||
sendBtn.frame = CGRectMake(self.frame.size.width - leftMargin - 60,topMargin,60,40);
|
||||
sendBtn.frame = CGRectMake(self.frame.size.width - leftMargin - 60,commitView.frame.size.height /2 - 20,60,40);
|
||||
[sendBtn addTarget:self action:@selector(sendBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[sendBtn setTitle:@"发送" forState:UIControlStateNormal];
|
||||
//[sendBtn setTitle:@"发送" forState:UIControlStateNormal];
|
||||
[sendBtn setImage:[UIImage imageNamed:@"ic_send"] forState:UIControlStateNormal];
|
||||
[sendBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
sendBtn.backgroundColor = [UIColor purpleColor];
|
||||
sendBtn.layer.masksToBounds = YES;
|
||||
sendBtn.layer.cornerRadius = 4;
|
||||
[commitView addSubview:sendBtn];
|
||||
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 5,self.frame.size.width - sendBtn.frame.size.width - 10*2 - 5, 30)];
|
||||
textField.backgroundColor = [UIColor lightGrayColor];
|
||||
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(44, commitView.frame.size.height /2 -15,self.frame.size.width - sendBtn.frame.size.width - 44 - 10 - leftMargin, 30)];
|
||||
textField.backgroundColor = [UIColor whiteColor];
|
||||
textField.placeholder = @"请输入弹幕";
|
||||
textField.layer.shadowColor = GIGARGB(190, 190, 190, 1).CGColor;
|
||||
textField.layer.shadowOffset = CGSizeMake(5, 5);
|
||||
textField.layer.shadowOpacity = 0.5;
|
||||
textField.layer.shadowRadius = 4;
|
||||
|
||||
textField.layer.masksToBounds = YES;
|
||||
textField.layer.cornerRadius = 2;
|
||||
textField.layer.borderWidth = 1;
|
||||
textField.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
textField.delegate = self;
|
||||
textField.returnKeyType = UIReturnKeySend;
|
||||
UIView *textLeftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0,10, textField.frame.size.height)];
|
||||
textField.leftView = textLeftview;
|
||||
textField.leftViewMode = UITextFieldViewModeAlways;
|
||||
[commitView addSubview:textField];
|
||||
self.inputTextField = textField;
|
||||
|
||||
@@ -155,7 +170,7 @@
|
||||
|
||||
- (void) keyboardWillHide:(NSNotification *)note
|
||||
{
|
||||
self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60);
|
||||
self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH);
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
_countLabel.outLineColor = [UIColor whiteColor];
|
||||
_countLabel.blurColor = [UIColor whiteColor];
|
||||
_countLabel.oinsideColor = [UIColor whiteColor];
|
||||
|
||||
_countLabel.text = @"00:00";
|
||||
_countLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:22];
|
||||
}
|
||||
@@ -86,6 +85,7 @@
|
||||
}
|
||||
|
||||
- (void)setLineWidth:(CGFloat)lineWidth{
|
||||
|
||||
CAShapeLayer *backgroundLayer = [self createRingLayerWithCenter:CGPointMake(CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame) / 2) radius:CGRectGetWidth(self.bounds) / 2 - lineWidth / 2 lineWidth:lineWidth color:self.backColor];
|
||||
_lineWidth = lineWidth;
|
||||
[self.layer addSublayer:backgroundLayer];
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
CAGradientLayer *gradientLayer1 = [CAGradientLayer layer];
|
||||
gradientLayer1.frame = CGRectMake(0, 0, width, height);
|
||||
gradientLayer1.colors = @[(__bridge id) [UIColor colorWithRed:151/255.0 green:253/255.0 blue:255/255.0 alpha:1/1.0].CGColor,(__bridge id)[UIColor colorWithRed:165/255.0 green:81/255.0 blue:216/255.0 alpha:1/1.0].CGColor];
|
||||
gradientLayer1.colors = @[(__bridge id) [UIColor colorWithRed:255/255.0 green:107/255.0 blue:107/255.0 alpha:1/1.0].CGColor,(__bridge id)[UIColor colorWithRed:187/255.0 green:79/255.0 blue:253/255.0 alpha:1/1.0].CGColor];
|
||||
|
||||
//纵向变化
|
||||
gradientLayer1.startPoint = CGPointMake(0.5, 0);
|
||||
|
||||
Reference in New Issue
Block a user