<commit_before>//
//  FormView.swift
//  iOS Example
//
//  Created by <NAME> on 14/01/2016.
//  Copyright © 2016 ustwo. All rights reserved.
//

import UIKit

import FormValidatorSwift


final class FormView: UIView, ValidatorControlDelegate {
    
    
    // MARK: - Properties
    
    let nameLabel       = UILabel()
    let nameTextField   = ValidatorTextField(validator: AlphabeticValidator(allowsWhitespace: false))
    
    let errorLabel      = UILabel()
    
    private let bottomBufferView    = UIView()
    private let stackView           = UIStackView()
    
    
    // MARK: - Initializers
    
    convenience init() {
        self.init(frame: CGRectZero)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        backgroundColor = UIColor.whiteColor()
        
        
        // Setup
        
        stackView.axis = .Vertical
        stackView.distribution = .Fill
        stackView.alignment = .Fill
        addSubview(stackView)
        
        nameLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)
        nameLabel.text = NSLocalizedString("Surname", comment: "")
        nameLabel.textAlignment = .Center
        stackView.addArrangedSubview(nameLabel)
        
        nameTextField.borderStyle = .Line
        nameTextField.font = UIFont.preferredFontForTextStyle(UIFontTextStyleBody)
        stackView.addArrangedSubview(nameTextField)
        
        errorLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)<commit_msg>Migrated to modern Swift CGGeometry constants<commit_after>//
//  FormView.swift
//  iOS Example
//
//  Created by <NAME> on 14/01/2016.
//  Copyright © 2016 ustwo. All rights reserved.
//

import UIKit

import FormValidatorSwift


final class FormView: UIView, ValidatorControlDelegate {
    
    
    // MARK: - Properties
    
    let nameLabel       = UILabel()
    let nameTextField   = ValidatorTextField(validator: AlphabeticValidator(allowsWhitespace: false))
    
    let errorLabel      = UILabel()
    
    private let bottomBufferView    = UIView()
    private let stackView           = UIStackView()
    
    
    // MARK: - Initializers
    
    convenience init() {
        self.init(frame: CGRect.zero)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        backgroundColor = UIColor.whiteColor()
        
        
        // Setup
        
        stackView.axis = .Vertical
        stackView.distribution = .Fill
        stackView.alignment = .Fill
        addSubview(stackView)
        
        nameLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)
        nameLabel.text = NSLocalizedString("Surname", comment: "")
        nameLabel.textAlignment = .Center
        stackView.addArrangedSubview(nameLabel)
        
        nameTextField.borderStyle = .Line
        nameTextField.font = UIFont.preferredFontForTextStyle(UIFontTextStyleBody)
        stackView.addArrangedSubview(nameTextField)
        
        errorLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)
{'fraction_non_alphanumeric': 0.08169195996125282, 'fraction_numerical': 0.007749434937035841, 'mean_word_length': 2.257623554153523, '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': '7111759', 'n_tokens_mistral': 924, 'n_tokens_neox': 886, 'n_words': 168}