-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tomassliz/cocoapods-pr
Add CocoaPods support
- Loading branch information
Showing
10 changed files
with
505 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
reated by https://www.gitignore.io/api/objective-c,macos | ||
|
||
### Objective-C ### | ||
|
||
## Build generated | ||
build/ | ||
DerivedData/ | ||
|
||
## Various settings | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata/ | ||
|
||
## Other | ||
*.moved-aside | ||
*.xcuserstate | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# | ||
# Pods/ | ||
|
||
# Carthage | ||
# | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
Carthage/Build | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output | ||
|
||
# Code Injection | ||
# | ||
# After new code Injection tools there's a generated folder /iOSInjectionProject | ||
# https://github.com/johnno1962/injectionforxcode | ||
|
||
iOSInjectionProject/ | ||
|
||
### Objective-C Patch ### | ||
*.xcscmblueprint | ||
|
||
|
||
### macOS ### | ||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
# Thumbnails | ||
._* | ||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "NSTiffSplitter" | ||
s.version = "1.0.0" | ||
s.summary = "Objective-C dynamic framework for viewing multipage tiff files on iOS devices." | ||
s.homepage = "https://github.com/Sharrp/NSTiffSplitter" | ||
s.license = "MIT" | ||
|
||
s.authors = { "Anton Sharrp Furin" => "", "Tomas Sliz" => "" } | ||
|
||
s.platform = :ios, "8.0" | ||
|
||
s.source = { :git => "https://github.com/Sharrp/NSTiffSplitter.git", :tag => "#{s.version}" } | ||
|
||
s.source_files = "Source/NSTiffSplitter/*.{h,m}" | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# NSTiffSplitter | ||
by Anton Sharrp Furin - http://sharrp.blogspot.com | ||
|
||
|
||
## How to use it | ||
|
||
NSTiffSplitter is an Objective-C class which allow you to show multipage TIFF files on iPad / iPhone / iPod Touch. Use it in two steps: | ||
|
||
1. Create NSTiffSplitter instance: | ||
```objc | ||
- (id) initWithData:(NSData *)imgData; | ||
``` | ||
or | ||
```objc | ||
- (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. | ||
|
||
## Installation | ||
|
||
### CocoaPods | ||
|
||
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: | ||
|
||
```bash | ||
$ gem install cocoapods | ||
``` | ||
|
||
To integrate NSTiffSplitter into your Xcode project using CocoaPods, specify it in your `Podfile`: | ||
|
||
```ruby | ||
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: | ||
|
||
```bash | ||
$ pod install | ||
``` | ||
|
||
Anton Sharrp Furin | ||
Web: http://sharrp.blogspot.com | ||
Twitter: http://twitter.com/5hr |
Binary file not shown.
Oops, something went wrong.