当PageViewController
导航样式设置为Horizontal
时,我可以让UIPageControl
工作,但是选择Vertical
后,UIPageControl
不会垂直或水平显示。
我正在AppDelegate中设置UIPageControl的外观:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.backgroundColor = [UIColor whiteColor];
return YES;
}
有没有一种方法让它以垂直位置出现?当导航选择“水平”选项时,上面的代码有效,但当选择“垂直”时则无效。