IdAndPwdView.m 2.2 KB
//
//  IdAndPwdView.m
//  CNLiveUserSystemDemo
//
//  Created by iOS on 16/9/14.
//  Copyright © 2016年 zhulin. All rights reserved.
//

#import "IdAndPwdView.h"
@interface IdAndPwdView ()

@property (nonatomic, strong)UILabel *idLbl;
@property (nonatomic, strong)UILabel *pwdLbl;

@end

@implementation IdAndPwdView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        
        [self addSubview:self.idLbl];
        [self addSubview:self.pwdLbl];
        [self addSubview:self.idTF];
        [self addSubview:self.pwdTF];
        
    }
    return self;
}

#pragma mark <GetMethod>
- (UILabel *)idLbl
{
    if (!_idLbl) {
        _idLbl = [[UILabel alloc] initWithFrame:CGRectMake(18, 0, 43, 57)];
        _idLbl.textAlignment = NSTextAlignmentRight;
        _idLbl.textColor = [UIColor blackColor];
        _idLbl.font = [UIFont systemFontOfSize:17];
        _idLbl.text = @"账号:";
    }
    return _idLbl;
}

- (UILabel *)pwdLbl
{
    if (!_pwdLbl) {
        _pwdLbl = [[UILabel alloc] initWithFrame:CGRectMake(18, 57, 43, 57)];
        _pwdLbl.textAlignment = NSTextAlignmentRight;
        _pwdLbl.textColor = [UIColor blackColor];
        _pwdLbl.text = @"密码:";
        _pwdLbl.font = [UIFont systemFontOfSize:17];
    }
    return _pwdLbl;
}

- (UITextField *)idTF
{
    if (!_idTF) {
        _idTF = [[UITextField alloc] initWithFrame:CGRectMake(78, 0, KScreenWidth - 88, 57)];
        _idTF.font = [UIFont systemFontOfSize:17];
        _idTF.placeholder = @"手机号码/Email";
        _idTF.returnKeyType = UIReturnKeyDone;
    }
    return _idTF;
}

- (UITextField *)pwdTF
{
    if (!_pwdTF) {
        _pwdTF = [[UITextField alloc] initWithFrame:CGRectMake(78, 57, KScreenWidth - 88, 57)];
        _pwdTF.font = [UIFont systemFontOfSize:17];
        _pwdTF.secureTextEntry = YES;
        _pwdTF.placeholder = @"6-20位字母或数字";
        _pwdTF.returnKeyType = UIReturnKeyDone;
    }
    return _pwdTF;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end