The NIPagingScrollView class provides a UITableView-like interface for loading pages via a data source.
|id< NIPagingScrollViewDataSource >||dataSource property|
|id< NIPagingScrollViewDelegate >||delegate property|
< NIPagingScrollViewPage > *)
< NIPagingScrollViewPage > *)
Changing the Visible Page
Rotating the Scroll View
The data source for this page album view.
This is the only means by which this paging view acquires any information about the album to be displayed.
The delegate for this paging view.
Any user interactions or state changes are sent to the delegate through this property.
The current center page index.
This is a zero-based value. If you intend to use this in a label such as "page ## of n" be sure to add one to this value.
Setting this value directly will center the new page without any animation.
The total number of pages in this paging view, as gathered from the data source.
This value is cached after reloadData has been called.
Until reloadData is called the first time, numberOfPages will be NIPagingScrollViewUnknownNumberOfPages.
The number of pixels on either side of each page.
The space between each page will be 2x this value.
By default this is NIPagingScrollViewDefaultPageMargin.
The type of paging scroll view to display.
This property allows you to configure whether you want a horizontal or vertical paging scroll view. You should set this property before you present the scroll view and not modify it after.
By default this is NIPagingScrollViewHorizontal.
Force the view to reload its data by asking the data source for information.
This must be called at least once after dataSource has been set in order for the view to gather any presentable information.
This method is cheap because we only fetch new information about the currently displayed pages. If the number of pages shrinks then the current center page index will be decreased accordingly.
Dequeues a reusable page from the set of recycled pages.
If no pages have been recycled for the given identifier then this will return nil. In this case it is your responsibility to create a new page.
The current center page view.
If no pages exist then this will return nil.
Returns YES if there is a next page.
Returns YES if there is a previous page.
Move to the next page if there is one.
Move to the previous page if there is one.
Move to the given page index with optional animation and option to enable page updates while scrolling.
NOTE: Passing YES for moveToPageAtIndex:animated:updateVisiblePagesWhileScrolling will cause every page from the present page to the destination page to be loaded. This has the potential to cause choppy animations.
|updateVisiblePagesWhileScrolling||If YES, will query the data source for any pages that become visible while the animation occurs.|
Move to the given page index with optional animation.
Stores the current state of the scroll view in preparation for rotation.
This must be called in conjunction with willAnimateRotationToInterfaceOrientation:duration: in the methods by the same name from the view controller containing this view.
Updates the frame of the scroll view while maintaining the current visible page's state.