lucoceano/Pager

Default Index

abhii24 opened this issue · 9 comments

can you please tell me how to scroll to a specific index at the start?

@lucoceano any ideas?

@nschucky ?

@lfarah @abhii24 I'll try something

@abhii24 do you mean like this or without the scrolling effect?

ezgif com-video-to-gif

no without any scrolling effect! suppose a user had bookmarked any index.Then he/she is supposed to be directed to that index kno when coming back @nschucky

?? @lucoceano @nschucky

Ok leave guys i have got the solution for it and its working like a charm thankyou 👍

@abhii24 I was gonna take an look right now, could you paste de solution here so when someone go looking for it they can find?

I haven't done much of a code changees @lucoceano ..You have already given a method called "startFromSecondTab" ..Which goes like this -
var index: Int = self.startFromSecondTab ? 1 : 0
self.selectTabAtIndex(index, swipe: true)

Whatever index i wanted to select as a starting index i had just passed it but only for the first time.

and in my class i have done "startFromSecondTab = True", for the first time or else "startFromSecondTab = false" thats it