Skip to content

Commit

Permalink
dodikk - additional methods (with improvement)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwojtaszek committed Apr 8, 2012
1 parent 8c6b34b commit 11b6a1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Cascade/CLCascadeNavigationController/CLCascadeView.m
Expand Up @@ -31,6 +31,7 @@ - (BOOL) pageExistAtIndex:(NSInteger)index;
- (void) unloadInvisiblePagesOnStock;
- (void) unloadPageIfNeeded:(NSInteger)index;

- (NSInteger) normalizePageIndex:(NSInteger)index;
- (CGSize) calculatePageSize:(UIView*)view;
- (CGSize) calculateContentSize;
- (UIEdgeInsets) calculateEdgeInset:(UIInterfaceOrientation)interfaceOrientation;
Expand Down Expand Up @@ -665,6 +666,11 @@ - (void) unloadPage:(UIView*)page remove:(BOOL)remove {
}


///////////////////////////////////////////////////////////////////////////////////////////////////
- (NSInteger)normalizePageIndex:(NSInteger)index {
return MAX(0, MIN(index, [_pages count] -1));
}

///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGSize) calculatePageSize:(UIView*)view {
CLViewSize size = [(CLSegmentedView*)view viewSize];
Expand Down

0 comments on commit 11b6a1c

Please sign in to comment.