UIPageViewController
次のように、ローテーション中に現在のページを更新しようとしています。
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
NSArray *controllers = @[someViewController];
UIPageViewControllerNavigationDirection direction = UIPageViewControllerNavigationDirectionForward;
[self.pageController setViewControllers:controllers direction:direction animated:YES completion:^(BOOL finished) {
/// This completion block isn't called ever in this case.
}];
}
しかし、何らかの理由で、この場合、完了ブロックは呼び出されませんが、他の場所から同じパラメーターで同じメソッドを呼び出すと、期待どおりに呼び出されます。
誰かがこの奇妙な動作を確認できますか?それがバグなのUIPageViewController
か、それとも私の誤用なのか?
アップデート
animated
パラメータをNO
完了ブロックに変更すると、期待どおりに呼び出されることがわかりました! だから、それはのバグだと私には思えますUIPageViewController
。