Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
NIPagingScrollView Class Reference

Overview

A paged scroll view that shows a series of pages.

Definition at line 44 of file NIPagingScrollView.h.

Inheritance diagram for NIPagingScrollView:
NIPhotoAlbumScrollView

Methods

Data Source
id< NIPagingScrollViewDataSourcedataSource property
id< NIPagingScrollViewDelegatedelegate property
(void) - reloadData
(UIView
< NIPagingScrollViewPage > *) 
- dequeueReusablePageWithIdentifier:
State
NSInteger centerPageIndex property
NSInteger numberOfPages property
(void) - setCenterPageIndex:animated:
Configuring Presentation
CGFloat pageHorizontalMargin property
Subclassing
UIScrollView * pagingScrollView property
NSMutableSet * visiblePages property
(void) - willDisplayPage:
(void) - didRecyclePage:
Changing the Visible Page
(BOOL) - hasNext
(BOOL) - hasPrevious
(void) - moveToNextAnimated:
(void) - moveToPreviousAnimated:
(void) - moveToPageAtIndex:animated:
Rotating the Scroll View
(void) - willRotateToInterfaceOrientation:duration:
(void) - willAnimateRotationToInterfaceOrientation:duration:

Method Documentation

- NIPagingScrollView: [read, write, assign]

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.

Reimplemented in NIPhotoAlbumScrollView.

Definition at line 73 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, write, assign]

The delegate for this paging view.

Any user interactions or state changes are sent to the delegate through this property.

Reimplemented in NIPhotoAlbumScrollView.

Definition at line 74 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, write, assign]

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.

Definition at line 81 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, assign]

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.

Definition at line 84 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, write, assign]

The number of pixels on either side of each page.

The space between each page will be 2x this value.

By default this is NIPagingScrollViewDefaultPageHorizontalMargin.

Definition at line 88 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, retain]

The internal scroll view.

Meant to be used by subclasses only.

Definition at line 105 of file NIPagingScrollView.h.

- NIPagingScrollView: [read, copy]

The set of currently visible pages.

Meant to be used by subclasses only.

Definition at line 106 of file NIPagingScrollView.h.

- (void) reloadData

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.

Definition at line 474 of file NIPagingScrollView.m.

- (UIView< NIPagingScrollViewPage > *) dequeueReusablePageWithIdentifier: (NSString *)  identifier

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.

Definition at line 247 of file NIPagingScrollView.m.

- (void) setCenterPageIndex: (NSInteger)  centerPageIndex
animated: (BOOL)  __NI_DEPRECATED_METHOD 

Change the center page index with optional animation.

This method is deprecated in favor of moveToPageAtIndex:animated:

Definition at line 654 of file NIPagingScrollView.m.

- (BOOL) hasNext

Returns YES if there is a next page.

Definition at line 567 of file NIPagingScrollView.m.

- (BOOL) hasPrevious

Returns YES if there is a previous page.

Definition at line 573 of file NIPagingScrollView.m.

- (void) moveToNextAnimated: (BOOL)  animated

Move to the next page if there is one.

Definition at line 628 of file NIPagingScrollView.m.

- (void) moveToPreviousAnimated: (BOOL)  animated

Move to the previous page if there is one.

Definition at line 638 of file NIPagingScrollView.m.

- (void) moveToPageAtIndex: (NSInteger)  pageIndex
animated: (BOOL)  animated 

Move to the given page index with optional animation.

Definition at line 596 of file NIPagingScrollView.m.

- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation)  toInterfaceOrientation
duration: (NSTimeInterval)  duration 

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.

Definition at line 523 of file NIPagingScrollView.m.

- (void) willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)  toInterfaceOrientation
duration: (NSTimeInterval)  duration 

Updates the frame of the scroll view while maintaining the current visible page's state.

Definition at line 545 of file NIPagingScrollView.m.

- (void) willDisplayPage: (UIView<NIPagingScrollViewPage> *)  pageView

Called before the page is about to be shown and after its frame has been set.

Meant to be subclassed. By default this method does nothing.

Definition at line 456 of file NIPagingScrollView.m.

- (void) didRecyclePage: (UIView<NIPagingScrollViewPage> *)  pageView

Called immediately after the page is removed from the paging scroll view.

Meant to be subclassed. By default this method does nothing.

Definition at line 462 of file NIPagingScrollView.m.

Generated for Nimbus by doxygen 1.7.4-20110629