<commit_before>//
//  HHTabBarView.swift
//  HHTabBarView
//
//  Created by <NAME> on 7/17/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

fileprivate let hhTabBarViewHeight = CGFloat(49.0)

///Animation Types for Tab Changes.
public enum HHTabBarTabChangeAnimationType {
    case flash, shake, pulsate, none
}

///Easily configured HHTabBarView class to replace the iOS default UITabBarController.
public class HHTabBarView: UIView {
    
    ///Singleton
    public static var shared = HHTabBarView.init()
    
    ///For Internal Navigation
    private(set) public var referenceUITabBarController =  UITabBarController()
    
    //MARK: Setters
    ///Animation Type
    public var tabChangeAnimationType: HHTabBarTabChangeAnimationType = .none
    
    ///Set HHTabButton for HHTabBarView.
    public var tabBarTabs = Array<HHTabButton>() {
        didSet {
            self.createTabs()
        }
    }
    
    ///Set the default tab for HHTabBarView.
    public var defaultIndex = 0 {
        didSet {
            if self.areTabsCreated() {
                self.selectTabAtIndex(withIndex: defaultIndex)
            }
        }
    }
    
    //Lock Index for Tabs
    ///Specify indexes of tabs to lock. [0, 2, 3]
    public var lockTabIndexes = Array<Int>() {
        didSet {
            self.lockUnlockTabs()
        }
    }
    
    ///Update Badge Value for Specific Tab.
    public func updateBadge(forTabIndex index: Int, withValue value: Int) {
        if self.areTabsCreated() {
            let hhTabButton = self.tabBarTabs[index]
            hhTabButton.badgeValue = value
        }
    }
    
    ///Reverse the Tabs from RightToLeft [Usage English/Arabic UI]
    public func rightToLeft() {
        let t = CGAffineTransform.init(scaleX: -1, y: -1)
        self.transform = t
        self.subviews.forEach { (subview) in
            print(subview.transform)
            subview.transform = t<commit_msg>Remove unnecessary print.<commit_after>//
//  HHTabBarView.swift
//  HHTabBarView
//
//  Created by <NAME> on 7/17/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

fileprivate let hhTabBarViewHeight = CGFloat(49.0)

///Animation Types for Tab Changes.
public enum HHTabBarTabChangeAnimationType {
    case flash, shake, pulsate, none
}

///Easily configured HHTabBarView class to replace the iOS default UITabBarController.
public class HHTabBarView: UIView {
    
    ///Singleton
    public static var shared = HHTabBarView.init()
    
    ///For Internal Navigation
    private(set) public var referenceUITabBarController =  UITabBarController()
    
    //MARK: Setters
    ///Animation Type
    public var tabChangeAnimationType: HHTabBarTabChangeAnimationType = .none
    
    ///Set HHTabButton for HHTabBarView.
    public var tabBarTabs = Array<HHTabButton>() {
        didSet {
            self.createTabs()
        }
    }
    
    ///Set the default tab for HHTabBarView.
    public var defaultIndex = 0 {
        didSet {
            if self.areTabsCreated() {
                self.selectTabAtIndex(withIndex: defaultIndex)
            }
        }
    }
    
    //Lock Index for Tabs
    ///Specify indexes of tabs to lock. [0, 2, 3]
    public var lockTabIndexes = Array<Int>() {
        didSet {
            self.lockUnlockTabs()
        }
    }
    
    ///Update Badge Value for Specific Tab.
    public func updateBadge(forTabIndex index: Int, withValue value: Int) {
        if self.areTabsCreated() {
            let hhTabButton = self.tabBarTabs[index]
            hhTabButton.badgeValue = value
        }
    }
    
    ///Reverse the Tabs from RightToLeft [Usage English/Arabic UI]
    public func rightToLeft() {
        let t = CGAffineTransform.init(scaleX: -1, y: -1)
        self.transform = t
        self.subviews.forEach { (subview) in
            subview.transform = t
{'fraction_non_alphanumeric': 0.09191840950167829, 'fraction_numerical': 0.009295120061967466, 'mean_word_length': 2.1444805194805197, 'pattern_counts': {'":': 0, '<': 11, '<?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': '2135597', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1171, 'n_words': 322}