V4.9.9测试版第一次提交 构建版本9.9.1
This commit is contained in:
@@ -10,11 +10,12 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
消息页面下拉框
|
||||
多功能下拉框
|
||||
*/
|
||||
typedef void (^MessageComboBoxBlock)(NSInteger tag);
|
||||
@interface MessageAlertView : UIView
|
||||
Copy MessageComboBoxBlock comboxBlock;
|
||||
-(void)loadInfoWithTitle:(NSArray *)titleArray Icons:(NSArray *)iconsArray;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -12,46 +12,85 @@
|
||||
-(instancetype)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [UIColor blackColor];
|
||||
UIRectCorner rectCorner = UIRectCornerBottomLeft|UIRectCornerBottomRight;
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:RECT(0, 0, kSizeFrom750(220), kSizeFrom750(90)) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(kSizeFrom750(6), kSizeFrom750(6))];
|
||||
|
||||
CAShapeLayer *shaperLayer = [CAShapeLayer layer];
|
||||
shaperLayer.path = path.CGPath;
|
||||
self.layer.mask = shaperLayer;
|
||||
|
||||
CAShapeLayer *borderLayer=[CAShapeLayer layer];
|
||||
borderLayer.path = path.CGPath;
|
||||
borderLayer.fillColor = [UIColor clearColor].CGColor;
|
||||
// borderLayer.strokeColor = [UIColor blackColor].CGColor;
|
||||
// borderLayer.lineWidth = 1;
|
||||
borderLayer.frame = self.bounds;
|
||||
[self initSubViews];
|
||||
self.backgroundColor = RGB(40, 40, 40);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubViews
|
||||
//-(void)initSubViews
|
||||
//{
|
||||
//
|
||||
// NSArray *imageArr = @[@"ifishdropview_delect_device"];
|
||||
// NSArray *titleArr = @[@"删除"];
|
||||
// CGFloat contentHeight = kSizeFrom750(90);
|
||||
// for (int i=0; i<imageArr.count; i++) {
|
||||
// UIImageView *icons = [[UIImageView alloc]init];
|
||||
//// [icons setContentMode:UIViewContentModeCenter];
|
||||
// [self addSubview:icons];
|
||||
// [icons setImage:IMAGEBYENAME([imageArr objectAtIndex:i])];
|
||||
// [icons mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(kSizeFrom750(22)+contentHeight*i);
|
||||
// make.left.mas_equalTo(kSizeFrom750(30));
|
||||
// make.width.height.mas_equalTo(kSizeFrom750(46));
|
||||
// }];
|
||||
//
|
||||
// UILabel *titleL = InitObject(UILabel);
|
||||
// [titleL setTextColor:[UIColor whiteColor]];
|
||||
// [titleL setFont:SYSTEMSIZE(30)];
|
||||
// titleL.textAlignment = NSTextAlignmentCenter;
|
||||
// [titleL setText:[titleArr objectAtIndex:i]];
|
||||
// [self addSubview:titleL];
|
||||
// [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(icons.mas_right);
|
||||
// make.right.mas_equalTo(self);
|
||||
// make.centerY.mas_equalTo(icons);
|
||||
// make.height.mas_equalTo(kSizeFrom750(30));
|
||||
//
|
||||
// }];
|
||||
//
|
||||
// if (i!=imageArr.count-1) {
|
||||
// UIView *line = InitObject(UIView);
|
||||
// [line setBackgroundColor:[UIColor whiteColor]];
|
||||
// [self addSubview:line];
|
||||
// [line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(icons.mas_right);
|
||||
// make.height.mas_equalTo(1);
|
||||
// make.right.mas_equalTo(self);
|
||||
// make.bottom.mas_equalTo(icons);
|
||||
// }];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// UIButton *btn = InitObject(UIButton);
|
||||
// [self addSubview:btn];
|
||||
// btn.tag = i;
|
||||
// [btn addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// [btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(contentHeight*i);
|
||||
// make.left.right.mas_equalTo(self);
|
||||
// make.height.mas_equalTo(contentHeight);
|
||||
// }];
|
||||
// }
|
||||
//}
|
||||
-(void)loadInfoWithTitle:(NSArray *)titleArray Icons:(NSArray *)iconsArray
|
||||
{
|
||||
|
||||
NSArray *imageArr = @[@"ifishdropview_delect_device"];
|
||||
NSArray *titleArr = @[@"删除"];
|
||||
|
||||
CGFloat contentHeight = kSizeFrom750(90);
|
||||
for (int i=0; i<imageArr.count; i++) {
|
||||
for (int i=0; i<titleArray.count; i++) {
|
||||
UIImageView *icons = [[UIImageView alloc]init];
|
||||
// [icons setContentMode:UIViewContentModeCenter];
|
||||
[icons setContentMode:UIViewContentModeScaleAspectFit];
|
||||
[self addSubview:icons];
|
||||
[icons setImage:IMAGEBYENAME([imageArr objectAtIndex:i])];
|
||||
[icons setImage:IMAGEBYENAME([iconsArray objectAtIndex:i])];
|
||||
[icons mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kSizeFrom750(22)+contentHeight*i);
|
||||
make.top.mas_equalTo(kSizeFrom750(25)+contentHeight*i);
|
||||
make.left.mas_equalTo(kSizeFrom750(30));
|
||||
make.width.height.mas_equalTo(kSizeFrom750(46));
|
||||
make.width.height.mas_equalTo(kSizeFrom750(40));
|
||||
}];
|
||||
|
||||
UILabel *titleL = InitObject(UILabel);
|
||||
[titleL setTextColor:[UIColor whiteColor]];
|
||||
[titleL setFont:SYSTEMSIZE(30)];
|
||||
titleL.textAlignment = NSTextAlignmentCenter;
|
||||
[titleL setText:[titleArr objectAtIndex:i]];
|
||||
[titleL setText:[titleArray objectAtIndex:i]];
|
||||
[self addSubview:titleL];
|
||||
[titleL mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(icons.mas_right);
|
||||
@@ -61,18 +100,6 @@
|
||||
|
||||
}];
|
||||
|
||||
if (i!=imageArr.count-1) {
|
||||
UIView *line = InitObject(UIView);
|
||||
[line setBackgroundColor:[UIColor whiteColor]];
|
||||
[self addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(icons.mas_right);
|
||||
make.height.mas_equalTo(1);
|
||||
make.right.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(icons);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
UIButton *btn = InitObject(UIButton);
|
||||
[self addSubview:btn];
|
||||
@@ -80,10 +107,40 @@
|
||||
[btn addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(contentHeight*i);
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.left.width.mas_equalTo(self);
|
||||
make.height.mas_equalTo(contentHeight);
|
||||
}];
|
||||
|
||||
if (i!=titleArray.count-1) {
|
||||
UIView *line = InitObject(UIView);
|
||||
[line setBackgroundColor:RGB(30, 30, 30)];
|
||||
[self addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(ONE_PIXEL_SIZE);
|
||||
make.left.width.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(btn);
|
||||
}];
|
||||
}
|
||||
}
|
||||
self.frame = RECT(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, kSizeFrom750(90)*titleArray.count);
|
||||
[self layoutIfNeeded];
|
||||
UIRectCorner rectCorner = UIRectCornerBottomLeft|UIRectCornerBottomRight;
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:RECT(0, 0, self.frame.size.width, self.frame.size.height) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(kSizeFrom750(6), kSizeFrom750(6))];
|
||||
|
||||
CAShapeLayer *shaperLayer = [CAShapeLayer layer];
|
||||
shaperLayer.path = path.CGPath;
|
||||
self.layer.mask = shaperLayer;
|
||||
|
||||
CAShapeLayer *borderLayer=[CAShapeLayer layer];
|
||||
borderLayer.path = path.CGPath;
|
||||
borderLayer.fillColor = [UIColor clearColor].CGColor;
|
||||
borderLayer.frame = self.bounds;
|
||||
|
||||
|
||||
self.transform = CGAffineTransformScale(self.transform,0.01,0.01);
|
||||
self.layer.position = CGPointMake(screen_width - kSizeFrom750(220)/2, 0);
|
||||
self.layer.anchorPoint = CGPointMake(0.5, 0);
|
||||
self.hidden = YES;
|
||||
}
|
||||
-(void)buttonClick:(UIButton *)sender{
|
||||
if (self.comboxBlock) {
|
||||
|
||||
Reference in New Issue
Block a user