我一直在使用UIPageController
在不同的控制器之间导航。现在我想在底部添加点,这样用户就可以看到他在哪个控制器上。这是通过UIPageControl
实现的。有没有简单的方法把这两者结合起来呢?
发布于 2013-12-01 05:10:44
如果你使用的是Xcode的基于页面的应用程序模板,那么转到属性检查器并将Transiton style属性设置为Scroll。
并转到您的应用程序AppDelegate.m文件并设置
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.backgroundColor = [UIColor whiteColor];
对于基于页面的Xcode模板,它已经在iOS 6和iOS 7上使用了,只是它的颜色设置为白色。
https://stackoverflow.com/questions/12916216
复制相似问题