Aligning page control

时间:2015-07-08 16:00:02

标签: ios swift uipagecontrol pagecontrol

I have so many images in my page control that indicator dots are out of screen. Is there a way to align page control to left so that the dot related to first page will be visible on screen?

This is how it looks like now:

enter image description here

And this is what I want to achieve

enter image description here

I tried

imagesPageControl.contentMode = .Left
imagesPageControl.contentHorizontalAlignment = .Left

but without success. I have also tried to add some left constrain without right. I'm aware that on the right side page control will be still out of screen.

1 个答案:

答案 0 :(得分:0)

如果页面数量不变或至少具有相似的值,则缩放是一个选项。但是,如果页面控制框架的宽度大于屏幕边界,我最终会手动调整页面控制框架。