evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
276 stars 43 forks source link

Shifting pageControl #9

Open agfa555 opened 8 years ago

agfa555 commented 8 years ago

Hi,

Me again. I was also trying to use the innerMargin property to move the pageControl in the x-axis but it doesn't seem to work. The CGSizeMake() values that I use work for the y-axis but not the x-axis. Is that possible?

Thank you!

evgenyneu commented 8 years ago

Hi,

I think you are referring to settings.pageControl.innerPadding property. This property sets the padding for the page control that is the distance between the dots and the page control background. It does not change the position of the page control in the scroll view.

Here is how it is used:

scrollView.auk.settings.pageControl.innerPadding = CGSize(width: 5, height: 20)
page_control_inner_padding

Page control is positioned in the scroll view the following way:

a) It is centred horizontally. b) It is aligned to the bottom edge of the scroll view.

At the moment the only available option for changing the position of page control is to change the margin between the bottom edge of the scroll view and the bottom of the page control. For example:

scrollView.auk.settings.pageControl.marginToScrollViewBottom = 8

I hope my explanation made it less confusing.

agfa555 commented 8 years ago

Ok, thanks for the explanation! I was just hoping to move them to the left corner.

RanjitKadam commented 8 years ago

@evgenyneu and @agfa555 how we can move it to left or right corner.

evgenyneu commented 8 years ago

Hi @RanjitKadam, there is no way to move it to left or right in the current version of the library. You can, of course, fork the code and position the page control as you like with an auto layout constraint.

NirajCapermint commented 4 years ago

Can we shift page control to left or right?

evgenyneu commented 4 years ago

@NirajCapermint no, unfortunately not, at the moment.