<commit_before>//
//  PasswordInputView.swift
//
//  Created by rain on 4/21/16.
//  Copyright © 2016 <NAME> All rights reserved.
//

import UIKit

public protocol PasswordInputViewTappedProtocol: class {
    func passwordInputView(passwordInputView: PasswordInputView, tappedString: String)
}

@IBDesignable
public class PasswordInputView: UIView {
    
    //MARK: Property
    public weak var delegate: PasswordInputViewTappedProtocol?
    
    private let circleView = UIView()
    private let button = UIButton()
    private let label = UILabel()
    private let fontSizeRatio: CGFloat = 46 / 40
    private let borderWidthRatio: CGFloat = 1 / 26
    private var touchUpFlag = false
    private var _isAnimating = false
    public  var isAnimating: Bool {
        return _isAnimating
    }
    
    @IBInspectable
    public var numberString: String = "2" {
        didSet {
            self.updateUI()
        }
    }
    
    @IBInspectable
    public var borderColor: UIColor = UIColor.darkGrayColor() {
        didSet {
            self.updateUI()
        }
    }
    
    @IBInspectable
    public var circleBackgroundColor: UIColor = UIColor.whiteColor() {
        didSet {
            self.updateUI()
        }
    }

    @IBInspectable
    public var highlightBackgroundColor: UIColor = UIColor.redColor() {
        didSet {
            self.updateUI()
        }
    }
    
    @IBInspectable
    public var textColor: UIColor = UIColor.darkGrayColor() {
        didSet {
            self.updateUI()
        }
    }
    
    @IBInspectable
    public var highlightTextColor: UIColor = UIColor.whiteColor() {
        didSet {
            self.updateUI()
        }
    }
    
    //MARK: Init
    public override init(frame: CGRect) {
        super.init(frame: frame)
    }
    
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    //MARK: Life Cycle
    #if TARGET_INTERFACE_BUILDER<commit_msg>fix. didSet refine<commit_after>//
//  PasswordInputView.swift
//
//  Created by rain on 4/21/16.
//  Copyright © 2016 <NAME> All rights reserved.
//

import UIKit

public protocol PasswordInputViewTappedProtocol: class {
    func passwordInputView(passwordInputView: PasswordInputView, tappedString: String)
}

@IBDesignable
public class PasswordInputView: UIView {
    
    //MARK: Property
    public weak var delegate: PasswordInputViewTappedProtocol?
    
    private let circleView = UIView()
    private let button = UIButton()
    private let label = UILabel()
    private let fontSizeRatio: CGFloat = 46 / 40
    private let borderWidthRatio: CGFloat = 1 / 26
    private var touchUpFlag = false
    private var _isAnimating = false
    public  var isAnimating: Bool {
        return _isAnimating
    }
    
    @IBInspectable
    public var numberString: String = "2" {
        didSet {
            self.label.text = numberString
        }
    }
    
    @IBInspectable
    public var borderColor: UIColor = UIColor.darkGrayColor() {
        didSet {
            self.backgroundColor = borderColor
        }
    }
    
    @IBInspectable
    public var circleBackgroundColor: UIColor = UIColor.whiteColor() {
        didSet {
            self.circleView.backgroundColor = circleBackgroundColor
        }
    }
    
    @IBInspectable
    public var textColor: UIColor = UIColor.darkGrayColor() {
        didSet {
            self.label.textColor = textColor
        }
    }
    
    @IBInspectable
    public var highlightBackgroundColor: UIColor = UIColor.redColor()
    
    @IBInspectable
    public var highlightTextColor: UIColor = UIColor.whiteColor()
    
    //MARK: Init
    public override init(frame: CGRect) {
        super.init(frame: frame)
    }
    
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    //MARK: Life Cycle
    #if TARGET_INTERFACE_BUILDER
{'fraction_non_alphanumeric': 0.07973251028806584, 'fraction_numerical': 0.00874485596707819, 'mean_word_length': 2.232751454696592, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4643153', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1159, 'n_words': 287}