Files
yuyin_ios/SweetParty/主类/旧项目依赖(以后调整)/MLMaskView.m
2025-08-08 11:05:33 +08:00

46 lines
1.1 KiB
Objective-C
Executable File

//
// MLMaskView.m
// MoHuanXingYu
//
// Created by aa on 2019/5/29.
// Copyright © 2019 MoHuanXingYu. All rights reserved.
//
#import "MLMaskView.h"
@interface MLMaskView ()
@property (weak, nonatomic) IBOutlet UILabel *promptLB;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *maskViewH;
@end
@implementation MLMaskView
- (IBAction)cancelClick:(UIButton *)sender {
!_leftButtonBlock ? : _leftButtonBlock();
[self removeFromSuperview];
}
- (IBAction)determineClick:(UIButton *)sender {
!_determineClickBlock ? : _determineClickBlock();
[self removeFromSuperview];
}
- (void)setLeftButtonString:(NSString *)left rightButton:(NSString *)right promptLB:(NSString *)title maskViewH:(CGFloat )maskViewH{
[self.leftButton setTitle:left forState:UIControlStateNormal];
[self.rightButton setTitle:right forState:UIControlStateNormal];
NSMutableAttributedString *attrString =
[[NSMutableAttributedString alloc] initWithString:title];
self.promptLB.attributedText = attrString;
self.promptLB.textAlignment = NSTextAlignmentCenter;
self.maskViewH.constant = maskViewH;
[self layoutIfNeeded];
}
@end