|
@@ -9,6 +9,7 @@
|
|
|
#import "shareSecretTableViewCell.h"
|
|
|
@interface shareBySecretView ()<UITableViewDelegate,UITableViewDataSource>
|
|
|
@property (nonatomic,strong)UITableView*tableView;
|
|
|
+@property (nonatomic,strong)UIView *whiteBgView;
|
|
|
@end
|
|
|
|
|
|
|
|
@@ -35,13 +36,13 @@
|
|
|
|
|
|
CGFloat curWhiteBgH = 64 + curTableViewH + 194;
|
|
|
|
|
|
- UIView *whiteBgView = [[UIView alloc] init];
|
|
|
- whiteBgView.backgroundColor = [UIColor whiteColor];
|
|
|
- [self addSubview:whiteBgView];
|
|
|
- whiteBgView.layer.cornerRadius = 8;
|
|
|
- whiteBgView.layer.masksToBounds = YES;
|
|
|
+ _whiteBgView = [[UIView alloc] init];
|
|
|
+ _whiteBgView.backgroundColor = [UIColor whiteColor];
|
|
|
+ [self addSubview:_whiteBgView];
|
|
|
+ _whiteBgView.layer.cornerRadius = 8;
|
|
|
+ _whiteBgView.layer.masksToBounds = YES;
|
|
|
|
|
|
- [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(40);
|
|
|
make.right.mas_equalTo(-40);
|
|
|
make.centerY.equalTo(self.mas_centerY).offset(-40);
|
|
@@ -66,7 +67,7 @@
|
|
|
titleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
|
|
|
titleLabel.font = [UIFont systemFontOfSize:18.0];
|
|
|
titleLabel.textColor = [UIColor hwColor:@"#151515"];
|
|
|
- [whiteBgView addSubview:titleLabel];
|
|
|
+ [_whiteBgView addSubview:titleLabel];
|
|
|
|
|
|
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(15);
|
|
@@ -75,7 +76,7 @@
|
|
|
make.height.mas_equalTo(25);
|
|
|
}];
|
|
|
|
|
|
- [whiteBgView addSubview:self.tableView];
|
|
|
+ [_whiteBgView addSubview:self.tableView];
|
|
|
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(15);
|
|
|
make.right.mas_equalTo(-15);
|
|
@@ -86,7 +87,7 @@
|
|
|
//文件分享有效期
|
|
|
UIView *expirationDateBgView = [[UIView alloc] init];
|
|
|
expirationDateBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9"];
|
|
|
- [whiteBgView addSubview:expirationDateBgView];
|
|
|
+ [_whiteBgView addSubview:expirationDateBgView];
|
|
|
expirationDateBgView.layer.cornerRadius = 8;
|
|
|
expirationDateBgView.layer.masksToBounds = YES;
|
|
|
|
|
@@ -136,7 +137,7 @@
|
|
|
//提取码
|
|
|
UIView *extractCodeBgView = [[UIView alloc] init];
|
|
|
extractCodeBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9"];
|
|
|
- [whiteBgView addSubview:extractCodeBgView];
|
|
|
+ [_whiteBgView addSubview:extractCodeBgView];
|
|
|
extractCodeBgView.layer.cornerRadius = 8;
|
|
|
extractCodeBgView.layer.masksToBounds = YES;
|
|
|
|
|
@@ -180,7 +181,7 @@
|
|
|
cancleButton.titleLabel.font = [UIFont systemFontOfSize:14.0];
|
|
|
[cancleButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
cancleButton.tag = 10;
|
|
|
- [whiteBgView addSubview:cancleButton];
|
|
|
+ [_whiteBgView addSubview:cancleButton];
|
|
|
cancleButton.layer.cornerRadius = 8;
|
|
|
cancleButton.layer.masksToBounds = YES;
|
|
|
cancleButton.backgroundColor = [UIColor hwColor:@"#E3E8F1"];
|
|
@@ -188,7 +189,7 @@
|
|
|
|
|
|
[cancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(30);
|
|
|
- make.right.equalTo(whiteBgView.mas_centerX).offset(-10);
|
|
|
+ make.right.equalTo(_whiteBgView.mas_centerX).offset(-10);
|
|
|
make.bottom.mas_equalTo(-30);
|
|
|
make.height.mas_equalTo(40);
|
|
|
}];
|
|
@@ -214,11 +215,11 @@
|
|
|
copyButton.clipsToBounds = YES;
|
|
|
copyButton.tag = 11;
|
|
|
|
|
|
- [whiteBgView addSubview:copyButton];
|
|
|
+ [_whiteBgView addSubview:copyButton];
|
|
|
|
|
|
[copyButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.right.mas_equalTo(-30);
|
|
|
- make.left.equalTo(whiteBgView.mas_centerX).offset(10);
|
|
|
+ make.left.equalTo(_whiteBgView.mas_centerX).offset(10);
|
|
|
make.bottom.mas_equalTo(-30);
|
|
|
make.height.mas_equalTo(40);
|
|
|
}];
|
|
@@ -363,4 +364,42 @@
|
|
|
[[iToast makeText:NSLocalizedString(@"copy_share_link_suc_tip",nil)] show];
|
|
|
}
|
|
|
|
|
|
+- (void)setIsPortraitType:(BOOL)isPortraitType
|
|
|
+{
|
|
|
+ _isPortraitType = isPortraitType;
|
|
|
+
|
|
|
+ NSInteger showCellNum = _didSelectListArr.count >=3 ? 3 :_didSelectListArr.count;
|
|
|
+
|
|
|
+ CGFloat curTableViewCellH = 70;
|
|
|
+ CGFloat curTableViewH = curTableViewCellH *showCellNum;
|
|
|
+
|
|
|
+ CGFloat curWhiteBgH = 64 + curTableViewH + 194;
|
|
|
+
|
|
|
+ if(_isPortraitType){
|
|
|
+ _whiteBgView.layer.cornerRadius = 8;
|
|
|
+
|
|
|
+ [_whiteBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.left.mas_equalTo(40);
|
|
|
+ make.right.mas_equalTo(-40);
|
|
|
+ make.centerY.equalTo(self.mas_centerY).offset(-40);
|
|
|
+ make.height.mas_equalTo(curWhiteBgH);
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+
|
|
|
+ _whiteBgView.layer.cornerRadius = 0;
|
|
|
+ [_whiteBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.width.mas_equalTo(400);
|
|
|
+ make.right.mas_equalTo(0);
|
|
|
+ make.bottom.mas_equalTo(0);
|
|
|
+ make.height.mas_equalTo(SCREEN_H);
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
@end
|