<commit_before>//  github: https://github.com/MakeZL/UIView-Category
//  author: @email <<EMAIL>>
//
//  MBIBDesignableExtension.swift
//  IBDesignable
//
//  Created by 张磊 on 15/4/29.
//  Copyright (c) 2015年 MakeZL. All rights reserved.
//

import UIKit

extension UILabel{
    @IBInspectable var textHexColor: NSString {
        get {
            return "0xffffff";
        }
        set {
            var scanner = NSScanner(string: newValue as String)
            var hexNum = 0 as UInt32
            
            if (scanner.scanHexInt(&hexNum)){
                var r = (hexNum >> 16) & 0xFF
                var g = (hexNum >> 8) & 0xFF
                var b = (hexNum) & 0xFF
                
                self.textColor = UIColor(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: 1.0)
            }
        }
    }
}

extension UIView{
    @IBInspectable var cornerRadius: CGFloat {
        get {
            return layer.cornerRadius
        }
        set {
            layer.cornerRadius = newValue
            layer.masksToBounds = newValue > 0
        }
    }<commit_msg>add button category in swift<commit_after>//  github: https://github.com/MakeZL/UIView-Category
//  author: @email <<EMAIL>>
//
//  MBIBDesignableExtension.swift
//  IBDesignable
//
//  Created by 张磊 on 15/4/29.
//  Copyright (c) 2015年 MakeZL. All rights reserved.
//

import UIKit

extension UILabel{
    @IBInspectable var textHexColor: NSString {
        get {
            return "0xffffff";
        }
        set {
            var scanner = NSScanner(string: newValue as String)
            var hexNum = 0 as UInt32
            
            if (scanner.scanHexInt(&hexNum)){
                var r = (hexNum >> 16) & 0xFF
                var g = (hexNum >> 8) & 0xFF
                var b = (hexNum) & 0xFF
                
                self.textColor = UIColor(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: 1.0)
            }
        }
    }
}

extension UIButton{
    @IBInspectable var textHexColor: NSString {
        get {
            return "0xffffff";
        }
        set {
            var scanner = NSScanner(string: newValue as String)
            var hexNum = 0 as UInt32
            
            if (scanner.scanHexInt(&hexNum)){
                var r = (hexNum >> 16) & 0xFF
                var g = (hexNum >> 8) & 0xFF
                var b = (hexNum) & 0xFF
                
                self.setTitleColor(UIColor(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: 1.0), forState: .Normal)
            }
        }
    }
}

extension UIView{
    @IBInspectable var cornerRadius: CGFloat {
        get {
            return layer.cornerRadius
        }
        set {
            layer.cornerRadius = newValue
            layer.masksToBounds = newValue > 0
        }
    }
{'fraction_non_alphanumeric': 0.110801393728223, 'fraction_numerical': 0.03205574912891986, 'mean_word_length': 1.4900260190806591, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '930387', 'n_tokens_mistral': 997, 'n_tokens_neox': 910, 'n_words': 217}