我正在使用uipageviewcontroller,它显示错误的索引页面。我发现uipageviewcontroller中存在缓存问题。这个bug仍然存在于ios8上。我找到了客观的东西 - c。有人可以帮助将此代码转换为swift吗?顺便说一下,我不想使用pageCurl风格!
__weak YourSelfClass *blocksafeSelf = self;
[self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:^(BOOL finished){
if(finished)
{
dispatch_async(dispatch_get_main_queue(), ^{
[blocksafeSelf.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:NULL];// bug fix for uipageview controller
});
}
}];