ealeksandrov / EAIntroView

Highly customizable drop-in solution for introduction views.
MIT License
3.76k stars 501 forks source link

change page scrolling direction #170

Closed oenama closed 7 years ago

oenama commented 8 years ago

is it possible to change scrolling direction to (right to left ) ?

ealeksandrov commented 8 years ago

You can use setCurrentPageIndex: to present last page, turn swipeToExit off, add transparent 1st page and use 1st page onPageDidAppear block to close intro.

oenama commented 8 years ago

well , I tried this but it didn't work. or maybe I got it wrong!

    intro.setCurrentPageIndex(6, animated: false)
    intro.swipeToExit = false
    page1.alpha = 0

}

page1.onPageDidAppear = {() -> Void in

    self.page1.alpha = 1
    self.intro.swipeToExit = true

}
ealeksandrov commented 8 years ago

Don't enable swipeToExit in onPageDidAppear. Just dismiss it straight away: [self.intro hideWithFadeOutDuration:0.3].

ealeksandrov commented 7 years ago

Initial configuration is ok, only make sure that you're setting page1.alpha = 0 before passing pages array to EAIntroView instance. In onPageDidAppear add only one line self.intro.hideWithFadeOutDuration(0.3). Nothing more there. That's should be enough.

Please let me know if you still have any questions.