Post

Replies

Boosts

Views

Activity

Reply to Weird UIPageViewController + drag bug
I found workaround for this, you need to set pageviewcontroller datasource delegate to nil during drag, and then set it again at end dragging. // WORKAROUND // When Dragging to edge of the screen in UIPageViewController, page controller switch page to a blank page func collectionView(_ collectionView: UICollectionView, dragSessionWillBegin session: UIDragSession) { if let pageController = self.parent as? UIPageViewController { self.tmpPageViewControllerDataSource = pageController.dataSource pageController.dataSource = nil } } func collectionView(_ collectionView: UICollectionView, dragSessionDidEnd session: UIDragSession) { if let pageController = self.parent as? UIPageViewController { pageController.dataSource = self.tmpPageViewControllerDataSource self.tmpPageViewControllerDataSource = nil } }
Dec ’19