<commit_before>//
//  SlideUpTransitioner.swift
//  AHContainerViewController
//
//  Created by <NAME> on 2017-07-12.
//

import Foundation


// Creates a slide from bottom to up transition

final class SlideUpTransitioner: AnimationProvider {
    
    private let wMultiplier: CGFloat
    private let hMultiplier: CGFloat
    init(size: SizeProportion) {
        wMultiplier = CGFloat(size.width)
        hMultiplier = CGFloat(size.height)
    }
    
    func transitionBlock(for context: AnimationContext) -> () -> Void {
        
        let vcSize = context.transitionVC.view.frame.size
        let width = vcSize.width * wMultiplier
        let height = vcSize.height * hMultiplier
        let center = context.transitionVC.view.center
        let appearFrame = CGRect(x: 0, y: 0, width: width,height: height)
        
        switch context.presentation {
        case .appear:
            context.toVC.view.frame = appearFrame
            context.toVC.view.center = CGPoint(x: center.x, y: center.y + height)
        case .dismiss: break
        }
        
        
        let animation = {
            switch context.presentation {
            case .appear:
                context.toVC.view.frame.origin = CGPoint(x: context.transitionVC.view.frame.origin.x, y: vcSize.height - height)
            case .dismiss:
                context.fromVC.view.center = CGPoint(x: center.x, y: center.y - height)
            }
        }
        
        return animation
    }
}
<commit_msg>Fixed the slidup bump issue for small frame<commit_after>//
//  SlideUpTransitioner.swift
//  AHContainerViewController
//
//  Created by <NAME> on 2017-07-12.
//

import Foundation


// Creates a slide from bottom to up transition

final class SlideUpTransitioner: AnimationProvider {
    
    private let wMultiplier: CGFloat
    private let hMultiplier: CGFloat
    init(size: SizeProportion) {
        wMultiplier = CGFloat(size.width)
        hMultiplier = CGFloat(size.height)
    }
    
    func transitionBlock(for context: AnimationContext) -> () -> Void {
        
        let vcSize = context.transitionVC.view.frame.size
        let width = vcSize.width * wMultiplier
        let height = vcSize.height * hMultiplier
        let center = context.transitionVC.view.center
        let appearFrame = CGRect(x: 0,
                                 y: vcSize.height,
                                 width: width,
                                 height: height)
        
        switch context.presentation {
        case .appear:
            context.toVC.view.frame = appearFrame
        case .dismiss: break
        }
        
        let animation = {
            switch context.presentation {
            case .appear:
                context.toVC.view.frame.origin = CGPoint(x: context.transitionVC.view.frame.origin.x,
                                                         y: vcSize.height - height)
            case .dismiss:
                context.fromVC.view.center = CGPoint(x: center.x, y: center.y - height)
            }
        }
        
        return animation
    }
}

{'fraction_non_alphanumeric': 0.0865197666882696, 'fraction_numerical': 0.006156837329876863, 'mean_word_length': 1.7126537785588751, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6722291', 'n_tokens_mistral': 895, 'n_tokens_neox': 856, 'n_words': 204}