The iOS framework that grows only as fast as its 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


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

Method Documentation


The data source for this scrubber view.

@property (nonatomic, weak) id<NIPhotoScrubberViewDataSource> dataSource;


The delegate for this scrubber view.

@property (nonatomic, weak) id<NIPhotoScrubberViewDelegate> delegate;


The selected photo index.

@property (nonatomic) NSInteger selectedPhotoIndex;


Forces the scrubber view to reload all of its data.

- (void)reloadData;

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.


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

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

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


Set the selected photo with animation.

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