NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
A single photo view that supports zooming and rotation.
Tasks | |
(void) | - pageDidDisappear |
(void) | - setFrameAndMaintainState: |
NSString * | reuseIdentifier property |
(void) | - prepareForReuse |
Configuring Functionality | |
BOOL | zoomingIsEnabled property |
BOOL | zoomingAboveOriginalSizeIsEnabled property |
BOOL | doubleTapToZoomIsEnabled property |
CGFloat | maximumScale property |
id< NIPhotoScrollViewDelegate > | photoScrollViewDelegate property |
State | |
NSInteger | pageIndex property |
CGSize | photoDimensions property |
UITapGestureRecognizer * | doubleTapGestureRecognizer property |
(UIImage *) | - image |
(NIPhotoScrollViewPhotoSize) | - photoSize |
(void) | - setImage:photoSize: |
Whether the photo is allowed to be zoomed.
By default this is YES.
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.
By default this is YES.
Whether double-tapping zooms in and out of the image.
Available on iOS 3.2 and later.
By default this is YES.
The maximum scale of the image.
By default this is 0, meaning the view will automatically determine the maximum scale. Setting this to a non-zero value will override the automatically-calculated maximum scale.
The photo scroll view delegate.
The index of this photo within a photo album.
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.
The gesture recognizer for double-tapping zooms in and out of the image.
This is used mainly for setting up dependencies between gesture recognizers.
The currently-displayed photo.
The current size of the photo.
This is used to replace the photo only with successively higher-quality versions.
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.
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.
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.
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.
Called immediately after the view has been dequeued from the recycled view pool.