             secondAnimationView.progress = 3 - progress
         case 3.0...5.0:
             thirdAnimationView.progress = 4 - progress
-            //getStartedButton.frame.origin.y = (scrollView.contentSize.width - scrollView.contentOffset.x) - (scrollView.frame.height/4)
+            getStartedButton.frame.origin.y = (scrollView.frame.width*4.2 - scrollView.contentOffset.x)
             //pageControll.frame.origin.y = getStartedButton.frame.origin.y - getStartedButton.frame.height
             pageControll.alpha = (4 - progress)*3
             logoImageView.hidden = true


import UIKit

extension UIScrollView{
    
    func totalOffsetInPercentage() -> CGFloat{
        let maxHorizontalOffset = self.contentSize.width - pageSize().width
        let currentHorizontalOffset = self.contentOffset.x
        return currentHorizontalOffset / maxHorizontalOffset
    }
    
    func pageProgressInPercentage() -> CGFloat{
        return self.contentOffset.x / pageSize().width
    }
    
    func pageSize() -> CGSize{
        return self.frame.size
    }
    
    func currentPage() -> Int{
        return Int(floor((self.contentOffset.x * 2.0 + self.frame.width) / (self.frame.width * 2.0)))
    }
}

class OnboardingViewController: UIViewController, UIScrollViewDelegate {
    

        scrollView.addSubview(firstAnimationText)
        
        secondAnimationView = LockView(frame: CGRectMake(viewOffset*2, 0, viewSize.width, viewSize.height))
        scrollView.addSubview(secondAnimationView!)
        secondAnimationView.constraints()
        
