Skip to content

Commit

Permalink
Removed one unnecessary class and documented another
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Oct 4, 2012
1 parent 990e844 commit ccb7bef
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 340 deletions.
18 changes: 0 additions & 18 deletions Core/Source/DTPageZoomScrollView.h

This file was deleted.

299 changes: 0 additions & 299 deletions Core/Source/DTPageZoomScrollView.m

This file was deleted.

47 changes: 46 additions & 1 deletion Core/Source/DTSmartPagingScrollView.h
Expand Up @@ -8,24 +8,69 @@


@class DTSmartPagingScrollView; @class DTSmartPagingScrollView;



/**
Protocol for providing pages to <DTSmartPagingScrollView>
*/
@protocol DTSmartPagingScrollViewDatasource <NSObject> @protocol DTSmartPagingScrollViewDatasource <NSObject>


/**
The number of pages for the <DTSmartPagingScrollView>
@param smartPagingScrollView The scroll view asking
@returns The number of pages
*/
- (NSUInteger)numberOfPagesInSmartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView; - (NSUInteger)numberOfPagesInSmartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView;

/**
Method to provide UIViews to be used for the pages
The frame of the passed view will be adjusted to the page size of the scroll view
@param smartPagingScrollView The scroll view asking
@param index The index of the page to provide
@returns The view to use for the given page index.
*/
- (UIView *)smartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView viewForPageAtIndex:(NSUInteger)index; - (UIView *)smartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView viewForPageAtIndex:(NSUInteger)index;


@optional @optional
/**
The number of pages for the <DTSmartPagingScrollView>
@param smartPagingScrollView The scroll view asking
@param index The index of the page
*/
- (void)smartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView didScrollToPageAtIndex:(NSUInteger)index; - (void)smartPagingScrollView:(DTSmartPagingScrollView *)smartPagingScrollView didScrollToPageAtIndex:(NSUInteger)index;


@end @end



/**
A scroll view that automatically manages a set of pages
*/
@interface DTSmartPagingScrollView : UIScrollView @interface DTSmartPagingScrollView : UIScrollView


/**
The page data source for the receiver
*/
@property (nonatomic, assign) id <DTSmartPagingScrollViewDatasource> pageDatasource; @property (nonatomic, assign) id <DTSmartPagingScrollViewDatasource> pageDatasource;

/**
The current page index visible on the receiver
*/
@property (nonatomic, assign) NSUInteger currentPageIndex; @property (nonatomic, assign) NSUInteger currentPageIndex;


/**
Reloads the pages from the datasource
*/
- (void)reloadData; - (void)reloadData;

/**
The range of indexes of the currently visible pages
*/
- (NSRange)rangeOfVisiblePages; - (NSRange)rangeOfVisiblePages;

/**
Scroll the receiver to the given page index
@param page The index of the page to move to
@param animated Whether the move should be animated
*/
- (void)scrollToPage:(NSInteger)page animated:(BOOL)animated; - (void)scrollToPage:(NSInteger)page animated:(BOOL)animated;


@end @end

0 comments on commit ccb7bef

Please sign in to comment.