<commit_before>//
//  CQButton.swift
//  Pods
//
//  Created by green on 15/12/18.
//
//

import UIKit

@IBDesignable public class CQButton: UIButton {
    
    @IBInspectable dynamic var borderWidth: CGFloat = 1 {
        
        didSet {
            self.layer.borderWidth = borderWidth
        }
    }
    @IBInspectable dynamic var cornerRadius : CGFloat = 4 {
        
        didSet {
            self.layer.cornerRadius = cornerRadius
        }
    }
    @IBInspectable dynamic var borderColor: UIColor = UIColor.lightGrayColor() {
        
        didSet {
            self.layer.borderColor = borderColor.CGColor
        }
    }
    
    @IBInspectable dynamic var bgColor: UIColor = UIColor.lightGrayColor() {
        
        didSet {
            self.layer.backgroundColor = bgColor.CGColor
        }
    }
    override public func drawRect(rect: CGRect) {
        super.drawRect(rect)
        
        self.layer.masksToBounds = true
        self.layer.cornerRadius = cornerRadius
        self.layer.borderColor = borderColor.CGColor
        self.layer.borderWidth = borderWidth
        self.layer.backgroundColor = bgColor.CGColor
        self.setTitleColor(UIColor.whiteColor(), forState: UIControlState())
        self.setTitleColor(UIColor.whiteColor(), forState: .Highlighted)
    }

}
<commit_msg>* 支持swift2.2<commit_after>//
//  CQButton.swift
//  Pods
//
//  Created by green on 15/12/18.
//
//

import UIKit

@IBDesignable public class CQButton: UIButton {
    
    @IBInspectable dynamic public var borderWidth: CGFloat = 1 {
        
        didSet {
            self.layer.borderWidth = borderWidth
        }
    }
    @IBInspectable dynamic public var cornerRadius : CGFloat = 4 {
        
        didSet {
            self.layer.cornerRadius = cornerRadius
        }
    }
    @IBInspectable dynamic public var borderColor: UIColor = UIColor.lightGrayColor() {
        
        didSet {
            self.layer.borderColor = borderColor.CGColor
        }
    }
    
    @IBInspectable dynamic public var bgColor: UIColor = UIColor.lightGrayColor() {
        
        didSet {
            self.layer.backgroundColor = bgColor.CGColor
        }
    }
    override public func drawRect(rect: CGRect) {
        super.drawRect(rect)
        
        self.layer.masksToBounds = true
        self.layer.cornerRadius = cornerRadius
        self.layer.borderColor = borderColor.CGColor
        self.layer.borderWidth = borderWidth
        self.layer.backgroundColor = bgColor.CGColor
        self.setTitleColor(UIColor.whiteColor(), forState: UIControlState())
        self.setTitleColor(UIColor.whiteColor(), forState: .Highlighted)
    }

}

{'fraction_non_alphanumeric': 0.08868846298384066, 'fraction_numerical': 0.006764374295377677, 'mean_word_length': 2.014722536806342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5771304', 'n_tokens_mistral': 809, 'n_tokens_neox': 791, 'n_words': 151}