0
我想實現視圖控制器之間的視圖控制器過渡的視圖控制器,水平和垂直。我不想使用scrollview或UIPageviewcontroller,我只是想要水平和垂直的轉換。有沒有辦法使用UIPanGestureRecognizer和UIViewControllerAnimatedTransitioning來做到這一點?像視圖控制器之間的過渡UIScrollview
我想實現視圖控制器之間的視圖控制器過渡的視圖控制器,水平和垂直。我不想使用scrollview或UIPageviewcontroller,我只是想要水平和垂直的轉換。有沒有辦法使用UIPanGestureRecognizer和UIViewControllerAnimatedTransitioning來做到這一點?像視圖控制器之間的過渡UIScrollview
你或許可以在當前視圖註冊一個UISwipeGesture
,並呼籲:
UIView.transition(from: <current view>, to: <destination view>, duration: <#T##TimeInterval#>, options: <#T##UIViewAnimationOptions#>, completion: <#T##((Bool) -> Void)?##((Bool) -> Void)?##(Bool) -> Void#>)
}
除非UIPageViewController無法比擬的你的目標,你建立自己。 – childrenOurFuture
有沒有現成的庫或代碼可供參考,以便了解如何構建這種類型的過渡,尤其是使用uipangesturerecognizer? –