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

Overview

A single photo view that supports zooming and rotation.

Definition at line 31 of file NIPhotoScrollView.h.

Inheritance diagram for NIPhotoScrollView:
<NIPagingScrollViewPage> <NIRecyclableView>

Methods

(void) - pageDidDisappear
(void) - setFrameAndMaintainState:
NSStringreuseIdentifier property
(void) - prepareForReuse
Configuring Functionality
BOOL zoomingIsEnabled property
BOOL zoomingAboveOriginalSizeIsEnabled property
BOOL doubleTapToZoomIsEnabled property
id< NIPhotoScrollViewDelegatephotoScrollViewDelegate property
State
NSInteger pageIndex property
CGSize photoDimensions property
(UIImage *) - image
(NIPhotoScrollViewPhotoSize) - photoSize
(void) - setImage:photoSize:

Method Documentation

- NIPhotoScrollView: [read, write, assign]

Whether the photo is allowed to be zoomed.

By default this is YES.

Definition at line 55 of file NIPhotoScrollView.h.

- NIPhotoScrollView: [read, write, assign]

Whether small photos can be zoomed at least until they fit the screen.

If this is disabled, images smaller than the view size can not be zoomed in beyond their original dimensions.

If this is enabled, images smaller than the view size can be zoomed in only until they fit the view bounds.

The default behavior in Photos.app allows small photos to be zoomed in.

Attention:
This will allow photos to be zoomed in even if they don't have any more pixels to show, causing the photo to blur. This can look ok for photographs, but might not look ok for software design mockups.

By default this is YES.

Definition at line 56 of file NIPhotoScrollView.h.

- NIPhotoScrollView: [read, write, assign]

Whether double-tapping zooms in and out of the image.

Available on iOS 3.2 and later.

By default this is YES.

Definition at line 57 of file NIPhotoScrollView.h.

- NIPhotoScrollView: [read, write, assign]

The photo scroll view delegate.

Definition at line 58 of file NIPhotoScrollView.h.

- NIPhotoScrollView: [read, write, assign]

The index of this photo within a photo album.

Reimplemented from <NIPagingScrollViewPage>.

Definition at line 66 of file NIPhotoScrollView.h.

- NIPhotoScrollView: [read, write, assign]

The largest dimensions of the photo.

This is used to show the thumbnail at the final image size in case the final image size is smaller than the album's frame. Without this value we have to assume that the thumbnail will take up the full screen. If the final image doesn't take up the full screen, then the photo view will appear to "snap" to the smaller full-size image when the final image does load.

CGSizeZero is used to signify an unknown final photo dimension.

Definition at line 67 of file NIPhotoScrollView.h.

- (UIImage *) image

The currently-displayed photo.

Definition at line 295 of file NIPhotoScrollView.m.

- NIPhotoScrollView:

The current size of the photo.

This is used to replace the photo only with successively higher-quality versions.

- (void) setImage: (UIImage *)  image
photoSize: (NIPhotoScrollViewPhotoSize)  photoSize 

Set a new photo with a specific size.

If image is nil then the photoSize will be overridden as NIPhotoScrollViewPhotoSizeUnknown.

Resets the current zoom levels and zooms to fit the image.

Definition at line 264 of file NIPhotoScrollView.m.

- (void) pageDidDisappear [optional, inherited]

Called after the page has gone off-screen.

This method should be used to reset any state information after a page goes off-screen. For example, in the Nimbus photo viewer we reset the zoom scale so that if the photo was zoomed in it will fit on the screen again when the user flips back and forth between two pages.

- (void) setFrameAndMaintainState: (CGRect)  frame [optional, inherited]

Called when the frame of the page is going to change.

Use this method to maintain any state that may be affected by the frame changing. The Nimbus photo viewer uses this method to save and restore the zoom and center point. This makes the photo always appear to rotate around the center point of the screen rather than the center of the photo.

- (NSString*) reuseIdentifier [read, write, optional, copy, inherited]

The identifier used to categorize views into buckets for reuse.

Views will be reused when a new view is requested with a matching identifier.

If the reuseIdentifier is nil then the class name will be used.

Reimplemented in NIPageView.

Definition at line 91 of file NIViewRecycler.h.

- (void) prepareForReuse

Called immediately after the view has been dequeued from the recycled view pool.

Generated for Nimbus by doxygen 1.7.4-20110629