Skip to content

Commit

Permalink
Merge pull request #3 from tomassliz/cocoapods-pr
Browse files Browse the repository at this point in the history
Add CocoaPods support
  • Loading branch information
Anton Vronskiy authored Nov 9, 2016
2 parents d4eea78 + 63700ac commit a4a48d1
Show file tree
Hide file tree
Showing 10 changed files with 505 additions and 30 deletions.
91 changes: 91 additions & 0 deletions .gitignore
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

16 changes: 16 additions & 0 deletions NSTiffSplitter.podspec
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

26 changes: 0 additions & 26 deletions README

This file was deleted.

56 changes: 56 additions & 0 deletions README.md
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 removed Source/.DS_Store
Binary file not shown.
Loading

0 comments on commit a4a48d1

Please sign in to comment.