How to disable interaction while setting viewcontroller in uipageviewcontroller?

23 views Asked by At

While setting viewcontroller using setViewControllers function, if I tap the viewcontroller while animating the updated viewcontroller not set and completion block in setViewControllers not get called

let currentPageIndex = getCurrentDetailVCIndex()
        if currentPageIndex < indexPath.item{
            setViewControllers([otherAppsDetailVCs[indexPath.row]], direction: .forward, animated: true,completion: {test in
                //some code
            })
        }else{
            setViewControllers([otherAppsDetailVCs[indexPath.row]], direction: .reverse, animated: true,completion: {test in
               //some code
            })
        }
0

There are 0 answers