But if currentPage is already 1, setCurrentPage will return without doing anything.
Solution
Set currentPage = 0 before setting self.currentPage = 1; That will force it to redraw the current page, which it should assuming the data source has really changed.
This solution is not working for me ,
if i set currentPage = 0 it crash on - (UIView ) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper ) pageFlipper
The Problem
If the user hasn't moved from the first page and you change the dataSource, the new page won't be redrawn.
Why It Happens
In setDataSource, you call self.currentPage = 1, like so:
https://github.com/mtabini/AFKPageFlipper/blob/master/Classes/AFKPageFlipper.m#L309
But if currentPage is already 1, setCurrentPage will return without doing anything.
Solution
Set currentPage = 0 before setting self.currentPage = 1; That will force it to redraw the current page, which it should assuming the data source has really changed.
Pull Request
En route...