ios - 如何在iOS中设置垂直页面指示器

标签 ios objective-c iphone swift

我尝试使用下面的代码在 View Controller 中设置垂直页面指示器

self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationVertical options:nil];

self.pageController.dataSource = self;
[[self.pageController view] setFrame:[[self view] bounds]];

我可以使用此代码垂直滚动,但是,如果我像这样设置 navigationOrientation,则不会显示点:

navigationOrientation:UIPageViewControllerNavigationOrientationVertical

How to develop vertical page indicators as shown in the below image:

最佳答案

在代码中设置 pageControl 的位置,添加:

pageControl.transform = CGAffineTransformMakeRotation(M_PI / 2);

关于ios - 如何在iOS中设置垂直页面指示器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40611087/

相关文章:

iphone - 在窗口模式下播放视频

objective-c - 在 OSX 中为多个用户安装的系统首选项 Pane 中的 UserDefaults

ios - 非常简单的 C 代码有问题

iOS 如何从另一个类访问 [tableView 重新加载数据]

iOS >> NavigationItem 后退按钮标题不改变

ios - 延长 UIPickerView [selectRow : inComponent: animated:]'s animation

iOS:动画 View 移回原始位置

iphone - 在 AppDelegate 中实例化的 UINavigationController

iphone - 核心数据 : Is it possible to use custom function in group by

ios - 如何为 iMessage Sticker App Grid Sticker 提供不同尺寸