//
//  RigistViewController.m
//  ALand
//
//  Created by Z on 16/3/17.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "RigistViewController.h"
#import "UIButton+countDown.h"
@interface RigistViewController ()
@property (weak, nonatomic) IBOutlet UIButton *sendCodeBtn;
@property (weak, nonatomic) IBOutlet UIButton *setPasswordVisible;
@property (nonatomic) BOOL isPasswordVisible;
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextFiled;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@property (weak, nonatomic) IBOutlet UITextField *passwordTextFiled;

@end

@implementation RigistViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.isPasswordVisible = NO;
    self.navigationItem.title = @"注 册";
    // Do any additional setup after loading the view from its nib.
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO];
}

- (IBAction)sendCodeAction:(UIButton *)sender {
    
    [self.sendCodeBtn startWithTime:60 title:@"发送验证码" countDownTitle:@"s" mainColor:nil countColor:nil mainTitleColor:[UIColor colorWithHexString:@"51B2F6"] countTitleColor:[UIColor colorWithHexString:@"888888"]];
}

- (IBAction)toAgreement:(UIButton *)sender {
    
}

- (IBAction)setPasswordVisible:(UIButton *)sender {
    self.isPasswordVisible = !self.isPasswordVisible;
    if (self.isPasswordVisible) {
        [self.setPasswordVisible setImage:[UIImage imageNamed:@"visible_icon"] forState:UIControlStateNormal];
        self.passwordTextFiled.secureTextEntry = NO;
    }else{
        [self.setPasswordVisible setImage:[UIImage imageNamed:@"Invisible_icon"] forState:UIControlStateNormal];
        self.passwordTextFiled.secureTextEntry = YES;

    }
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
