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


A control built for quickly skimming through a collection of images.

The user interacts with the scrubber by "scrubbing" their finger along the control, or more simply, touching the control and moving their finger along a single axis. Scrubbers can be seen in the on the iPad.

The thumbnails displayed in a scrubber will be a subset of the overall set of photos. The wider the scrubber, the more thumbnails will be shown. The displayed thumbnails will be chosen at constant intervals in the album, with a larger "selected" thumbnail image that will show whatever image is currently selected. This larger thumbnail will be positioned relatively within the scrubber to show the user what the current selection is in a physically intuitive way.

This view is a completely independent view from the photo scroll view so you can choose to use this in your already built photo viewer.

Screenshot of NIPhotoScrubberView on the iPad.
See also:

Definition at line 47 of file NIPhotoScrubberView.h.

Inherits UIView.


Data Source
id< NIPhotoScrubberViewDataSourcedataSource property
(void) - reloadData
(void) - didLoadThumbnail:atIndex:
id< NIPhotoScrubberViewDelegatedelegate property
Accessing Selection
NSInteger selectedPhotoIndex property
(void) - setSelectedPhotoIndex:animated:

Method Documentation

- (id<NIPhotoScrubberViewDataSource>) dataSource [read, write, assign]

The data source for this scrubber view.

Definition at line 73 of file NIPhotoScrubberView.h.

- (id<NIPhotoScrubberViewDelegate>) delegate [read, write, assign]

The delegate for this scrubber view.

Definition at line 101 of file NIPhotoScrubberView.h.

- (NSInteger) selectedPhotoIndex [read, write, assign]

The selected photo index.

Definition at line 109 of file NIPhotoScrubberView.h.

- (void) reloadData

Forces the scrubber view to reload all of its data.

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 expensive. It will reset the state of the view and remove all existing thumbnails before requesting the new information from the data source.

Definition at line 448 of file NIPhotoScrubberView.m.

- (void) didLoadThumbnail: (UIImage *)  image
atIndex: (NSInteger)  photoIndex 

Notify the scrubber view that a thumbnail has been loaded at a given index.

This method is cheap, so do not be afraid to call it whenever a thumbnail loads. It will only modify visible thumbnails.

Definition at line 431 of file NIPhotoScrubberView.m.

- (void) setSelectedPhotoIndex: (NSInteger)  photoIndex
animated: (BOOL)  animated 

Set the selected photo with animation.

Definition at line 479 of file NIPhotoScrubberView.m.

Generated for Nimbus by doxygen 1.7.4-20110629