<commit_before>//
//  WYInteractiveTransitions.swift
//  WYInteractiveTransitions
//
//  Created by <NAME> on 6/5/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

public enum WYTransitoinType {
    case Push
    case Zoom
    case Up
    case Swing
}

public class WYInteractiveTransitions: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {
    
    
    public func configureTransition(duration duration: NSTimeInterval?=nil, toView toViewController: UIViewController, panEnable handGestureEnable: Bool?=true, type transitionType: WYTransitoinType) {
        if let duration = duration {
            self.durationTransition = duration
        } else { self.durationTransition = 0.5 }
        self.transitionType = transitionType
        self.toViewController = toViewController
        self.toViewController?.transitioningDelegate = self
        self.toViewController?.modalPresentationStyle = .FullScreen
        if handGestureEnable == true {
            let panEdgeGesture = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(WYInteractiveTransitions.screenEdgePanGestureHandler(_:)))
            panEdgeGesture.edges = UIRectEdge.Left
            toViewController.view.addGestureRecognizer(panEdgeGesture)
        }
    }
    
    private var presenting = true<commit_msg>Converted to Swift 3<commit_after>//
//  WYInteractiveTransitions.swift
//  WYInteractiveTransitions
//
//  Created by <NAME> on 6/5/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

public enum WYTransitoinType {
    case Push
    case Zoom
    case Up
    case Swing
}

public class WYInteractiveTransitions: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {   
    public func configureTransition(duration duration: NSTimeInterval?=nil, toView toViewController: UIViewController, panEnable handGestureEnable: Bool?=true, type transitionType: WYTransitoinType) {
        if let duration = duration {
            self.durationTransition = duration
        } else { self.durationTransition = 0.5 }
        self.transitionType = transitionType
        self.toViewController = toViewController
        self.toViewController?.transitioningDelegate = self
        self.toViewController?.modalPresentationStyle = .FullScreen
        if handGestureEnable == true {
            let panEdgeGesture = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(WYInteractiveTransitions.screenEdgePanGestureHandler(_:)))
            panEdgeGesture.edges = UIRectEdge.Left
            toViewController.view.addGestureRecognizer(panEdgeGesture)
        }
    }
    
    private var presenting = true
{'fraction_non_alphanumeric': 0.07086044830079537, 'fraction_numerical': 0.007592190889370932, 'mean_word_length': 3.558484349258649, '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': '1874943', 'n_tokens_mistral': 788, 'n_tokens_neox': 729, 'n_words': 164}