                     let height = screenHeight * ((1 - animationSizeDiff) + progress * animationSizeDiff)
                     let x = (screenWidth - width)/2
                     let y = (screenHeight - height)/2
-                    afterViewController.view.frame = CGRectMake(x.toHalfCGFloat(), y.toHalfCGFloat(), width.toHalfCGFloat(), height.toHalfCGFloat())
+                    afterViewController.view.frame = CGRectMake(x, y, width, height)
                     afterViewController.view.alpha = (1 - animationAlphaDiff) + progress * animationAlphaDiff
                 }
                 else {
-                    visibleViewController?.view.frame = CGRectMake(-(horizontalDiff * animationBounceSize).toHalfCGFloat(), 0, screenWidth.toHalfCGFloat(), screenHeight.toHalfCGFloat())
+                    visibleViewController?.view.frame = CGRectMake(-(horizontalDiff * animationBounceSize), 0, screenWidth, screenHeight)
                 }
                 
                 if let visibleViewController = visibleViewController {

    }
    
}


extension Double {
    
    func toHalfCGFloat() -> CGFloat {
        return CGFloat(halfRound())
    }
    
    func halfRound() -> Double {
        return round(self*2)/2
    }
    
}

extension CGFloat {
    
    func toHalfCGFloat() -> CGFloat {
        return Double(self).toHalfCGFloat()
    }
    
}


                    let height = screenHeight * (1 - progress * animationSizeDiff)
                    let x = (screenWidth - width)/2
                    let y = (screenHeight - height)/2
                    visibleViewController?.view.frame = CGRectMake(x, y, width, height)
                    visibleViewController?.view.alpha = 1 - progress * animationAlphaDiff
                }
                
