 		else if !vert && scrollView.contentOffset.x < -30 {
 			self.scrollToPreviousPage()
 		}
-
+		
 		self.delegate?.pagedScrollViewDidEndDragging?(pagedScrollView: self, willDecelerate: decelerate)
-
+		
 	}
 	
 	public func scrollViewDidScroll(_ scrollView: UIScrollView) {

	public var delegate : TKPagedScrollViewDelegate?
	
	


}

	@objc optional func pagedScrollViewDidScrollToTop(pagedScrollView: TKPagedScrollView?)
}

@objc public enum TKPageScrollDirection : Int {
	case vertical
	case horizontal
}


open class TKPagedScrollView: UIView, UIScrollViewDelegate {
	
	
	
	
	
	// MARK: INIT
	
	override init(frame: CGRect) {
		scrollDirection = .vertical
		scrollView = UIScrollView(frame: CGRect(x:0,y:0,width:frame.size.width,height:frame.size.height))
		currentPage = 0
		animatingPages = false
		
		_pages = []
		super.init(frame: frame)
	}
	
	@objc public init(frame: CGRect, direction: TKPageScrollDirection) {
		
		scrollDirection = direction
		scrollView = UIScrollView(frame: CGRect(x:0,y:0,width:frame.size.width,height:frame.size.height))
		currentPage = 0
		animatingPages = false
		
		_pages = []
		super.init(frame: frame)
		
