2013-10-14 39 views
1

我的UIPageViewController類符合UIPageViewControllerDataSource協議,但UIPageControl不可見。UIPageControl(頁面控制)不顯示在UIPageViewController中

我已經附上屏幕代表UIPageViewController和它的孩子UIViewController之間的代碼段,這是通過setViewControllers方法添加的。

enter image description here

問題是,爲什麼不顯示頁面控制,我可以做什麼用它,只是加入UIPageControl實例來查看自己?

回答

1

出於某種原因,看起來UIPageControl僅在過渡樣式設置爲「滾動」時纔會出現 - 非常令人沮喪! (希望我錯了?) 點擊你的UIPageViewController('Home Page View Controller'?)查看Page View Controller下的選項。

0

確保您已經實施了可選的-presentationCountForPageViewController:-presentationIndexForPageViewController:數據源方法。

UIPageViewController.h是關於要求非常明確:

一個頁面指示器將是可見的,如果這兩種方法來實現, 過渡的風格是「UIPageViewControllerTransitionStyleScroll」,並 導航定位是 「UIPageViewControllerNavigationOrientationHorizontal」。

相關問題