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

Overview

A simple photo album view controller implementation with a toolbar.

This controller does not implement the photo album data source, it simply implements some of the most common UI elements that are associated with a photo viewer.

For an example of implementing the data source, see the photos examples in the examples directory.

Implementing Delegate Methods

This view controller already implements NIPhotoAlbumScrollViewDelegate. If you want to implement methods of this delegate you should take care to call the super implementation if necessary. The following methods have implementations in this class:

  • photoAlbumScrollViewDidScroll:
  • photoAlbumScrollView:didZoomIn:
  • photoAlbumScrollViewDidChangePages:

Recommended Configurations

Default: Zooming enabled with translucent toolbar

The default settings are good for showing a photo album that takes up the entire screen. The photos will be visible beneath the toolbar because it is translucent. The chrome will be hidden whenever the user starts interacting with the photos.

Zooming disabled with opaque toolbar

The following settings are good for viewing photo albums when you want to keep the chrome visible at all times without zooming enabled.

Definition at line 72 of file NIToolbarPhotoViewController.h.

Inheritance diagram for NIToolbarPhotoViewController:
<NIPhotoAlbumScrollViewDelegate> <NIPhotoScrubberViewDelegate> <NIPagingScrollViewDelegate>

Methods

Configuring Functionality
BOOL toolbarIsTranslucent property
BOOL hidesChromeWhenScrolling property
BOOL chromeCanBeHidden property
BOOL animateMovingToNextAndPreviousPhotos property
BOOL scrubberIsEnabled property
Views
UIToolbar * toolbar property
NIPhotoAlbumScrollViewphotoAlbumView property
NIPhotoScrubberViewphotoScrubberView property
Toolbar Buttons
UIBarButtonItem * nextButton property
UIBarButtonItem * previousButton property
[NIPhotoAlbumScrollViewDelegate] Scrolling and Zooming
(void) - photoAlbumScrollView:didZoomIn:
[NIPhotoAlbumScrollViewDelegate] Data Availability
(void) - photoAlbumScrollViewDidLoadNextPhoto:
(void) - photoAlbumScrollViewDidLoadPreviousPhoto:
[NIPhotoAlbumScrollViewDelegate] Scrolling and Zooming
(void) - pagingScrollViewDidScroll:
[NIPagingScrollViewDelegate] Changing Pages
(void) - pagingScrollViewDidChangePages:
Selection Changes
(void) - photoScrubberViewDidChangeSelection:

Method Documentation

- NIToolbarPhotoViewController: [read, write, assign]

Whether the toolbar is translucent and shows photos beneath it or not.

If this is enabled, the toolbar will be translucent and the photo view will take up the entire view controller's bounds.

If this is disabled, the photo will only occupy the remaining space above the toolbar. The toolbar will also not be hidden when the chrome is dismissed. This is by design because dismissing the toolbar when photos can't be displayed beneath it would leave an empty space below the album.

By default this is YES.

Definition at line 104 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, write, assign]

Whether or not to hide the chrome when the user begins interacting with the photo.

If this is enabled, then the chrome will be hidden when the user starts swiping from one photo to another.

The chrome is the toolbar and the system status bar.

By default this is YES.

Attention:
This will be set to NO if toolbarCanBeHidden is set to NO.

Definition at line 105 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, write, assign]

Whether or not to allow hiding the chrome.

If this is enabled then the user will be able to single-tap to dismiss or show the toolbar.

The chrome is the toolbar and the system status bar.

If this is disabled then the chrome will always be visible.

By default this is YES.

Attention:
Setting this to NO will also disable hidesToolbarWhenScrolling.

Definition at line 106 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, write, assign]

Whether to animate moving to a next or previous photo when the user taps the button.

By default this is NO.

Definition at line 107 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, write, assign]

Whether to show a scrubber in the toolbar instead of next/previous buttons.

By default this is YES on the iPad and NO on the iPhone.

Definition at line 108 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, retain]

The toolbar view.

Definition at line 113 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, retain]

The photo album view.

Definition at line 114 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, retain]

The photo scrubber view.

Definition at line 115 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, retain]

The 'next' button.

Definition at line 120 of file NIToolbarPhotoViewController.h.

- NIToolbarPhotoViewController: [read, retain]

The 'previous' button.

Definition at line 121 of file NIToolbarPhotoViewController.h.

- (void) photoAlbumScrollView: (NIPhotoAlbumScrollView *)  photoAlbumScrollView
didZoomIn: (BOOL)  didZoomIn 

The user double-tapped to zoom in or out.

- (void) photoAlbumScrollViewDidLoadNextPhoto: (NIPhotoAlbumScrollView *)  photoAlbumScrollView

The next photo in the album has been loaded and is ready to be displayed.

- (void) photoAlbumScrollViewDidLoadPreviousPhoto: (NIPhotoAlbumScrollView *)  photoAlbumScrollView

The previous photo in the album has been loaded and is ready to be displayed.

- (void) pagingScrollViewDidScroll: (NIPagingScrollView *)  pagingScrollView

The user is scrolling between two photos.

- (void) pagingScrollViewDidChangePages: (NIPagingScrollView *)  pagingScrollView

The current page has changed.

pagingScrollView.centerPageIndex will reflect the changed page index.

- (void) photoScrubberViewDidChangeSelection: (NIPhotoScrubberView *)  photoScrubberView

The photo scrubber changed its selection.

Use photoScrubberView.selectedPhotoIndex to access the current selection.

Generated for Nimbus by doxygen 1.7.4-20110629