Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何更改Swift中的PageViewController点位置?_Ios_Swift_Uipageviewcontroller - Fatal编程技术网

Ios 如何更改Swift中的PageViewController点位置?

Ios 如何更改Swift中的PageViewController点位置?,ios,swift,uipageviewcontroller,Ios,Swift,Uipageviewcontroller,如何查看我的imageView并没有覆盖全屏。我如何才能使我的imageView覆盖全屏,并且imageView上有点 我是用viewController+PageViewController完成的 我使用以下选项调整其大小: self.pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.size.height) 我的代码很长,因此如果您想查看我的代码的确切部分,只需询问

如何查看我的imageView并没有覆盖全屏。我如何才能使我的imageView覆盖全屏,并且imageView上有点

我是用viewController+PageViewController完成的

我使用以下选项调整其大小:

self.pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.size.height)

我的代码很长,因此如果您想查看我的代码的确切部分,只需询问一下即可

如果您必须仅显示数组中的图像,则可以使用UIScrollView包含所有图像

之后,您可以使用UIPageControl。将UIPageControl添加到UIView

然后在ScrollViewDiEndDecelling方法中,通过计算UIScrollView的contentOffset,可以设置UIPageControl


希望这有帮助。

您可以使用pageVC委托来了解页面何时更改并更新点。

您的图像大小是多少?它足够大吗?@Munahil是的,当然可以制作一个UIImageView,查看您想要的大小,并将其中的图像设置为“按比例填充”,而不是按比例填充