NSTiffSplitter is an Objective-C class which allow you to show multipage TIFF files on iPad / iPhone / iPod Touch. Use it in two steps:
- Create NSTiffSplitter instance:
- (id) initWithData:(NSData *)imgData;
or
- (id) initWithImageUrl:(NSURL *)imgUrl usingMapping:(BOOL)usingMapping;
Second method always use mapping. 2. Get any page of tiff file with next method:
- (NSData *) dataForImage:(NSUInteger)imageIndex;
It returns monopage tiff file for every page of multipage tiff file.
You can get count of images in file with countOfImages property.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate NSTiffSplitter into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'NSTiffSplitter', '~> 1.0'
end
Then, run the following command:
$ pod install