<commit_before>//
//  JDSlider.swift
//  Pods
//
//  Created by <NAME> on 22/2/16.
//  Copyright ©2016 <NAME>. All rights reserved.
//
//

import UIKit

//MARK: JDSliderDataSource
public protocol JDSliderDataSource: class {
    
    func slider(jdSliderNumberOfSlides slider: JDSliderView) -> Int
    func slider(slider: JDSliderView, viewForSlideAtIndex index: Int) -> UIView
}

//MARK: JDSliderDelegate
public protocol JDSliderDelegate: class {
    
    func slider(slider: JDSliderView, didSelectSlideAtIndex index: Int)
}

//MARK: JDSliderView
public class JDSliderView: UIView {
    
    //MARK: Enum
    public enum StatePageIndicator{
        case Normal
        case Highlight
    }

    //MARK:Public Properties
    public weak var delegate      : JDSliderDelegate?
    public weak var datasource    : JDSliderDataSource?
    
    //MARK:Private Properties
    private var numbersOfSlides    : Int = 0
    private var jdSliderScrollView : UIScrollView!
    private var pageControl        : UIPageControl!

    
    //MARK: Init
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self._setUpUI()
    }
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
        self._setUpUI()
    }
    
    //MARK: LifeCycle
    public override func layoutSubviews() {
        super.layoutSubviews()
        self._adapterUI()
        self._prepareDataSource()
    }

    //MARK: Selector
    func handleTap(sender: UITapGestureRecognizer){
        self.delegate?.slider(self, didSelectSlideAtIndex: self.pageControl.currentPage)
    }
    
    //MARK: Public Methods
    public func tintPageIndicator(color: UIColor, state: StatePageIndicator){<commit_msg>[UPDATED] public pageControl<commit_after>//
//  JDSlider.swift
//  Pods
//
//  Created by <NAME> on 22/2/16.
//  Copyright ©2016 <NAME>. All rights reserved.
//
//

import UIKit

//MARK: JDSliderDataSource
public protocol JDSliderDataSource: class {
    
    func slider(jdSliderNumberOfSlides slider: JDSliderView) -> Int
    func slider(slider: JDSliderView, viewForSlideAtIndex index: Int) -> UIView
}

//MARK: JDSliderDelegate
public protocol JDSliderDelegate: class {
    
    func slider(slider: JDSliderView, didSelectSlideAtIndex index: Int)
}

//MARK: JDSliderView
public class JDSliderView: UIView {
    
    //MARK: Enum
    public enum StatePageIndicator{
        case Normal
        case Highlight
    }

    //MARK:Public Properties
    public weak var delegate      : JDSliderDelegate?
    public weak var datasource    : JDSliderDataSource?
    
    //MARK:Private Properties
    private var numbersOfSlides    : Int = 0
    private var jdSliderScrollView : UIScrollView!
    var pageControl                : UIPageControl!

    
    //MARK: Init
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self._setUpUI()
    }
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
        self._setUpUI()
    }
    
    //MARK: LifeCycle
    public override func layoutSubviews() {
        super.layoutSubviews()
        self._adapterUI()
        self._prepareDataSource()
    }

    //MARK: Selector
    func handleTap(sender: UITapGestureRecognizer){
        self.delegate?.slider(self, didSelectSlideAtIndex: self.pageControl.currentPage)
    }
    
    //MARK: Public Methods
    public func tintPageIndicator(color: UIColor, state: StatePageIndicator){
{'fraction_non_alphanumeric': 0.09009529309846953, 'fraction_numerical': 0.005775339301183945, 'mean_word_length': 2.6772823779193207, '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': '5185626', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1065, 'n_words': 262}