49 lines
948 B
Mathematica
49 lines
948 B
Mathematica
|
|
//
|
||
|
|
// SARoomPswAlert.m
|
||
|
|
// SamaVoice
|
||
|
|
//
|
||
|
|
// Created by bj_szd on 2022/5/27.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "SARoomPswAlert.h"
|
||
|
|
#import "HWTFCodeBView.h"
|
||
|
|
|
||
|
|
@interface SARoomPswAlert ()
|
||
|
|
|
||
|
|
@property (nonatomic, strong) HWTFCodeBView *codeView;
|
||
|
|
|
||
|
|
@property (nonatomic, copy) NSString *rid;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@implementation SARoomPswAlert
|
||
|
|
|
||
|
|
- (void)awakeFromNib {
|
||
|
|
[super awakeFromNib];
|
||
|
|
|
||
|
|
[self.confirmBtn setJianBianWithCGSize:CGSizeMake(120, 39)];
|
||
|
|
|
||
|
|
[self createUI];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)createUI {
|
||
|
|
HWTFCodeBView *codeView = [[HWTFCodeBView alloc] initWithCount:4 margin:15];
|
||
|
|
codeView.frame = CGRectMake(0, 0, 245, 50);
|
||
|
|
codeView.backgroundColor = kClearColor;
|
||
|
|
[self.pswBgView addSubview:codeView];
|
||
|
|
self.codeView = codeView;
|
||
|
|
}
|
||
|
|
|
||
|
|
- (IBAction)onCancel:(id)sender {
|
||
|
|
[self removeFromSuperview];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (IBAction)onConfirm:(id)sender {
|
||
|
|
if (self.onConfirmBlock) {
|
||
|
|
self.onConfirmBlock(self.codeView.code);
|
||
|
|
}
|
||
|
|
[self removeFromSuperview];
|
||
|
|
}
|
||
|
|
|
||
|
|
@end
|