MatthewYork / MYBlurIntroductionView

A super-charged version of MYIntroductionView for building custom app introductions and tutorials.
MIT License
1.53k stars 195 forks source link

crashes when swiping from last panel #26

Closed orenk86 closed 10 years ago

orenk86 commented 10 years ago

Hi, First of all, I have to say I'm really digging this library! :) When I'm on the last panel, and I try to swipe to the next one, the app crashes with the error: index 3 beyond bounds [0 .. 2]. Any way of fixing this? Thanks!

MatthewYork commented 10 years ago

hmmm... Let me take a look.

orenk86 commented 10 years ago

I think I figured out what went wrong.... :) I'm trying to create a circular scroll between the panels, that can also support swiping (not just automatic scroll to the next panel every few seconds). But when you swipe left from the last panel, the intro view "finishes" and disappears. Afterwards when it tries to move to the next (first) panel - the app crashes (because the pager isn't there anymore).

Is there any chance you might consider creating support for circular swiping between the last and first panels, instead of "finishing the intro"? or alternately, have an option to prevent further swiping when you're on the last panel (you can swipe to the previous panel, but not to the next)?

MatthewYork commented 10 years ago

Glad you pinpointed the crash!

I think circular swiping would be a great mode to have available. It would certainly make the controller more flexible for non-introduction related tasks.