What's the right way to open BakerView on a specific page?
I've implemented my own "Favourites/Bookmarks/Starred" screen for a monthly magazine. From this screen I want to load the BakerView with a book. So I'm loading in a specific magazine on a specific page.
this is my code:
NSString *bookPath = [favourite objectForKey:FAV_PAGE_BOOK_PATH];
NSNumber *pageNumber = [favourite objectForKey:FAV_PAGE_NUMBER];
BakerBook *book = [[BakerBook alloc] initWithBookPath:bookPath bundled:NO];
book.currentPage = pageNumber;
BakerViewController *bakerViewController = [[BakerViewController alloc] initWithBook:book];
[bakerViewController changePage:[pageNumber intValue]];
[self.navigationController pushViewController:bakerViewController animated:YES];
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
This essentially works (Although I don't think setting the currentPage on the book does anything) but I get some weird issues where sometimes I can't scroll between pages, and sometimes it will load the page and then switch to a different page. Weird stuff like that. Any tips as to the "right way" to do this?
Cheers.
It's hard to tell... the BakerBook class has the item bakerStartAtPage (from -baker-start-at-page in the json) but that then gets overwritten by BakerBookStatus... maybe check that out...