<commit_before>//
//  ViewController.swift
//  DizzySample
//
//  Created by <NAME> on 7/9/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var dizzyActivityIndicator: DizzyActivityIndicatorView!
    @IBOutlet weak var hiddenStateToggle: UISwitch!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        dizzyActivityIndicator.hidesWhenStopped = hiddenStateToggle.on
    }
    
    @IBAction func didTapToggleButton(sender: UIButton) {
        if dizzyActivityIndicator.isAnimating {
            dizzyActivityIndicator.stopAnimating()
        } else {
            dizzyActivityIndicator.startAnimating()
        }
    }
    
    @IBAction func didTapHiddenToggle(toggle: UISwitch) {
        dizzyActivityIndicator.hidesWhenStopped = toggle.on
    }
    
}

extension CALayer {
    var borderUIColor: UIColor {
        get {
            return UIColor(CGColor: borderColor!)
        } set {
            borderColor = newValue.CGColor
        }
    }
}<commit_msg>when this view controller loads up, the switch ui should reflect state of DizzyActivityIndicatorView<commit_after>//
//  ViewController.swift
//  DizzySample
//
//  Created by <NAME> on 7/9/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var dizzyActivityIndicator: DizzyActivityIndicatorView!
    @IBOutlet weak var hiddenStateToggle: UISwitch!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        hiddenStateToggle.on = dizzyActivityIndicator.hidesWhenStopped
    }
    
    @IBAction func didTapToggleButton(sender: UIButton) {
        if dizzyActivityIndicator.isAnimating {
            dizzyActivityIndicator.stopAnimating()
        } else {
            dizzyActivityIndicator.startAnimating()
        }
    }
    
    @IBAction func didTapHiddenToggle(toggle: UISwitch) {
        dizzyActivityIndicator.hidesWhenStopped = toggle.on
    }
    
}

extension CALayer {
    var borderUIColor: UIColor {
        get {
            return UIColor(CGColor: borderColor!)
        } set {
            borderColor = newValue.CGColor
        }
    }
}
{'fraction_non_alphanumeric': 0.07983761840324763, 'fraction_numerical': 0.007216959855660803, 'mean_word_length': 2.5206349206349206, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2640327', 'n_tokens_mistral': 662, 'n_tokens_neox': 664, 'n_words': 139}