Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions GRKPageViewController/GRKPageViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,12 @@
*/
- (void)setCurrentIndex:(NSUInteger)index animated:(BOOL)animated;

/**
If you change the count of viewControllers after viewDidLoad, call this method to recalculate the
scrollView content size.
e.g. PageViewController is added to the screen upon viewHiearchy setup, but your data
is coming in asynchronously.
*/
- (void) updatePageLayout;

@end
5 changes: 5 additions & 0 deletions GRKPageViewController/GRKPageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ - (void)initPages

#pragma mark - Acessors

- (void) updatePageLayout
{
[self initPages];
}

- (void)setCurrentIndex:(NSUInteger)currentIndex
{
[self setCurrentIndex:currentIndex animated:NO];
Expand Down