<commit_before>//
//  BMDialView.swift
//  DialPad
//
//  Created by <NAME> on 18/09/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit
import AudioToolbox

class BMDialView: UIView {
    
    var callTapped: ((String)->())?
    let ThemeColor = UIColor(red: 21/255.0, green: 134/255.0, blue: 88/255.0, alpha: 1.0)
    
    private var padView: UIView?
    private var textField: UITextField?
    private var requiredKeyPadHeight = (UIScreen.main.bounds.width / 5) * 6 + 50
    private var deleteBtnTimer: Timer?
    private var numberTimer: Timer?
    
    func setupDialPad(frame: CGRect)
    {
        self.frame = frame
        setupUI()
    }
    
    private func setupUI() -> Void {
        textField = UITextField()
        textField?.tintColor = UIColor.clear
        let gap = self.frame.size.width/5
        textField?.frame = CGRect.init(x: gap/2, y: (frame.size.height - requiredKeyPadHeight - 100)/2, width: self.frame.size.width-gap, height: 100)
        textField?.adjustsFontSizeToFitWidth = true
        textField?.textAlignment = NSTextAlignment.center
        textField?.textColor = ThemeColor;
        textField?.inputView = padView
        textField?.inputAccessoryView = padView
        let backspaceButton = UIButton.init(type: UIButtonType.system)
        backspaceButton.setBackgroundImage(UIImage.init(named: "Backspace"), for: UIControlState.normal)
        backspaceButton.addTarget(self, action: #selector(backspaceTapped), for: UIControlEvents.touchUpInside)
        let longPress = UILongPressGestureRecognizer.init(target: self, action: #selector(longPressedDeleteBtn))
        longPress.minimumPressDuration = 0.3
        backspaceButton.addGestureRecognizer(longPress)<commit_msg>fixed truncation<commit_after>//
//  BMDialView.swift
//  DialPad
//
//  Created by <NAME> on 18/09/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit
import AudioToolbox

class BMDialView: UIView {
    
    var callTapped: ((String)->())?
    let ThemeColor = UIColor(red: 21/255.0, green: 134/255.0, blue: 88/255.0, alpha: 1.0)
    let width: Float = 0
    private var padView: UIView?
    private var textField: UITextField?
    private var requiredKeyPadHeight = (UIScreen.main.bounds.width / 5) * 6 + 50
    private var deleteBtnTimer: Timer?
    private var numberTimer: Timer?
    
    func setupDialPad(frame: CGRect)
    {
        self.frame = frame
        setupUI()
    }
    
    private func setupUI() -> Void {
        textField = UITextField()
        textField?.tintColor = UIColor.clear
        let gap = self.frame.size.width/5
        textField?.frame = CGRect.init(x: gap/2, y: (frame.size.height - requiredKeyPadHeight - 150)/2, width: self.frame.size.width-gap, height: 100)
        textField?.adjustsFontSizeToFitWidth = true
        textField?.textAlignment = NSTextAlignment.center
        textField?.textColor = ThemeColor;
        textField?.inputView = padView
        textField?.inputAccessoryView = padView
        let backspaceButton = UIButton.init(type: UIButtonType.system)
        backspaceButton.setBackgroundImage(UIImage.init(named: "Backspace"), for: UIControlState.normal)
        backspaceButton.addTarget(self, action: #selector(backspaceTapped), for: UIControlEvents.touchUpInside)
        let longPress = UILongPressGestureRecognizer.init(target: self, action: #selector(longPressedDeleteBtn))
        longPress.minimumPressDuration = 0.3
        backspaceButton.addGestureRecognizer(longPress)
{'fraction_non_alphanumeric': 0.10764385914686515, 'fraction_numerical': 0.02662467792728314, 'mean_word_length': 3.10093896713615, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '4123129', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1074, 'n_words': 240}