├── .gitignore ├── .slather.yml ├── .swift-version ├── .travis.yml ├── Gemfile ├── LICENSE.md ├── Podfile ├── Podfile.lock ├── README.md ├── Rakefile ├── Screenshots ├── Screenshot1.png └── Screenshot2.png ├── THPDFKit.podspec ├── THPDFKit.xcworkspace └── contents.xcworkspacedata ├── THPDFKit ├── THPDFKit.xcodeproj │ └── project.pbxproj ├── THPDFKit │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── arrow_down.imageset │ │ │ ├── Contents.json │ │ │ ├── arrow_down.png │ │ │ ├── arrow_down@2x.png │ │ │ └── arrow_down@3x.png │ │ ├── arrow_right.imageset │ │ │ ├── Contents.json │ │ │ ├── arrow_right.png │ │ │ ├── arrow_right@2x.png │ │ │ └── arrow_right@3x.png │ │ ├── btn-bookmark-active.imageset │ │ │ ├── Contents.json │ │ │ ├── btn-bookmark-active.png │ │ │ ├── btn-bookmark-active@2x.png │ │ │ └── btn-bookmark-active@3x.png │ │ ├── btn-bookmark.imageset │ │ │ ├── Contents.json │ │ │ ├── btn-bookmark.png │ │ │ ├── btn-bookmark@2x.png │ │ │ └── btn-bookmark@3x.png │ │ ├── btn-outline.imageset │ │ │ ├── Contents.json │ │ │ ├── outline.png │ │ │ ├── outline@2x.png │ │ │ └── outline@3x.png │ │ ├── btn-search.imageset │ │ │ ├── Contents.json │ │ │ ├── search.png │ │ │ ├── search@2x.png │ │ │ └── search@3x.png │ │ ├── btn-thumbnails.imageset │ │ │ ├── Contents.json │ │ │ ├── thumbnails.png │ │ │ ├── thumbnails@2x.png │ │ │ └── thumbnails@3x.png │ │ └── edit-annotations.imageset │ │ │ ├── Contents.json │ │ │ ├── edit-annotations.png │ │ │ ├── edit-annotations@2x.png │ │ │ └── edit-annotations@3x.png │ ├── Info.plist │ ├── Legacy │ │ └── QLViewController.swift │ ├── OutlineTableViewCell.swift │ ├── OutlineTableViewController.swift │ ├── PDFKitViewController.swift │ ├── PDFViewController.swift │ ├── SearchTableViewCell.swift │ ├── SearchTableViewController.swift │ ├── THPDFKit.h │ ├── ThumbnailCollectionViewCell.swift │ ├── ThumbnailCollectionViewController.swift │ └── Utils │ │ └── PinHelper.swift └── THPDFKitTests │ ├── Info.plist │ └── THPDFKitTests.swift └── THPDFKitDemo ├── THPDFKitDemo.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ └── THPDFKitDemo.xcscheme ├── THPDFKitDemo ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-1024.png │ │ ├── Icon-120.png │ │ ├── Icon-121.png │ │ ├── Icon-152.png │ │ ├── Icon-167.png │ │ ├── Icon-180.png │ │ ├── Icon-20.png │ │ ├── Icon-29.png │ │ ├── Icon-40.png │ │ ├── Icon-41.png │ │ ├── Icon-42.png │ │ ├── Icon-58.png │ │ ├── Icon-59.png │ │ ├── Icon-60.png │ │ ├── Icon-76.png │ │ ├── Icon-80.png │ │ ├── Icon-81.png │ │ └── Icon-87.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── PDFSelectionTableViewController.swift └── Resources │ └── book-of-vaadin.pdf ├── THPDFKitDemoTests ├── Info.plist └── THPDFKitDemoTests.swift └── THPDFKitDemoUITests ├── Info.plist └── THPDFKitDemoUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/osx,swift,xcode,cocoapods,objective-c 3 | 4 | ### CocoaPods ### 5 | ## CocoaPods GitIgnore Template 6 | 7 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 8 | # - Also handy if you have a large number of dependant pods 9 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 10 | Pods/ 11 | 12 | ### Objective-C ### 13 | # Xcode 14 | # 15 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 16 | 17 | ## Build generated 18 | build/ 19 | DerivedData/ 20 | 21 | ## Various settings 22 | *.pbxuser 23 | !default.pbxuser 24 | *.mode1v3 25 | !default.mode1v3 26 | *.mode2v3 27 | !default.mode2v3 28 | *.perspectivev3 29 | !default.perspectivev3 30 | xcuserdata/ 31 | 32 | ## Other 33 | *.moved-aside 34 | *.xccheckout 35 | *.xcscmblueprint 36 | 37 | ## Obj-C/Swift specific 38 | *.hmap 39 | *.ipa 40 | *.dSYM.zip 41 | *.dSYM 42 | 43 | # CocoaPods - Refactored to standalone file 44 | 45 | 46 | # Carthage - Refactored to standalone file 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 54 | 55 | fastlane/report.xml 56 | fastlane/Preview.html 57 | fastlane/screenshots 58 | fastlane/test_output 59 | 60 | # Code Injection 61 | # 62 | # After new code Injection tools there's a generated folder /iOSInjectionProject 63 | # https://github.com/johnno1962/injectionforxcode 64 | 65 | iOSInjectionProject/ 66 | 67 | ### Objective-C Patch ### 68 | 69 | ### OSX ### 70 | *.DS_Store 71 | .AppleDouble 72 | .LSOverride 73 | 74 | # Icon must end with two \r 75 | Icon 76 | 77 | # Thumbnails 78 | ._* 79 | 80 | # Files that might appear in the root of a volume 81 | .DocumentRevisions-V100 82 | .fseventsd 83 | .Spotlight-V100 84 | .TemporaryItems 85 | .Trashes 86 | .VolumeIcon.icns 87 | .com.apple.timemachine.donotpresent 88 | 89 | # Directories potentially created on remote AFP share 90 | .AppleDB 91 | .AppleDesktop 92 | Network Trash Folder 93 | Temporary Items 94 | .apdisk 95 | 96 | ### Swift ### 97 | # Xcode 98 | # 99 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 100 | 101 | ## Build generated 102 | 103 | ## Various settings 104 | 105 | ## Other 106 | Gemfile.lock 107 | 108 | ## Obj-C/Swift specific 109 | 110 | ## Playgrounds 111 | timeline.xctimeline 112 | playground.xcworkspace 113 | 114 | # Swift Package Manager 115 | # 116 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 117 | # Packages/ 118 | # Package.pins 119 | .build/ 120 | 121 | # CocoaPods - Refactored to standalone file 122 | 123 | # Carthage - Refactored to standalone file 124 | 125 | # fastlane 126 | # 127 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 128 | # screenshots whenever they are needed. 129 | # For more information about the recommended setup visit: 130 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 131 | 132 | 133 | ### Xcode ### 134 | # Xcode 135 | # 136 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 137 | 138 | ## Build generated 139 | 140 | ## Various settings 141 | 142 | ## Other 143 | 144 | ### Xcode Patch ### 145 | *.xcodeproj/* 146 | !*.xcodeproj/project.pbxproj 147 | !*.xcodeproj/xcshareddata/ 148 | !*.xcworkspace/contents.xcworkspacedata 149 | /*.gcno 150 | 151 | 152 | # End of https://www.gitignore.io/api/osx,swift,xcode,cocoapods,objective-c -------------------------------------------------------------------------------- /.slather.yml: -------------------------------------------------------------------------------- 1 | coverage_service: coveralls 2 | xcodeproj: THPDFKitDemo/THPDFKitDemo.xcodeproj 3 | source_directory: THPDFKitDemo 4 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode9.2 3 | cache: 4 | - bundler 5 | - cocoapods 6 | before_script: 7 | - bundle install 8 | - bundle exec pod install --repo-update 9 | script: 10 | - set -o pipefail && bundle exec rake test | bundle exec xcpretty --test --color 11 | - bundle exec pod lib lint --quick 12 | after_success: bundle exec slather 13 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'cocoapods' 4 | gem 'rake' 5 | gem 'slather' 6 | gem 'xcpretty' 7 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | ## MIT License 4 | 5 | Copyright (c) 2016 Tribus Hannes (http://hons82.github.io) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '9.0' 3 | inhibit_all_warnings! 4 | use_frameworks! 5 | 6 | workspace 'THPDFKit' 7 | 8 | target 'THPDFKitDemo' do 9 | 10 | project 'THPDFKitDemo/THPDFKitDemo.xcodeproj' 11 | 12 | pod 'CocoaLumberjack/Swift', '~>3' 13 | 14 | target 'THPDFKitDemoTests' do 15 | inherit! :search_paths 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaLumberjack/Default (3.4.1) 3 | - CocoaLumberjack/Swift (3.4.1): 4 | - CocoaLumberjack/Default 5 | 6 | DEPENDENCIES: 7 | - CocoaLumberjack/Swift (~> 3) 8 | 9 | SPEC CHECKSUMS: 10 | CocoaLumberjack: 2e258a064cacc8eb9a2aca318e24d02a0a7fd56d 11 | 12 | PODFILE CHECKSUM: bc0a948e6e8797b504b0b3f889403c86a1d8580b 13 | 14 | COCOAPODS: 1.4.0 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | THPDFKit 2 | === 3 | 4 | [![Build Status](https://travis-ci.org/hons82/THPDFKit.png)](https://travis-ci.org/hons82/THPDFKit) 5 | [![Pod Version](http://img.shields.io/cocoapods/v/THPDFKit.svg?style=flat)](http://cocoadocs.org/docsets/THPDFKit/) 6 | [![Pod Platform](http://img.shields.io/cocoapods/p/THPDFKit.svg?style=flat)](http://cocoadocs.org/docsets/THPDFKit/) 7 | [![Pod License](http://img.shields.io/cocoapods/l/THPDFKit.svg?style=flat)](http://opensource.org/licenses/MIT) 8 | [![Coverage Status](https://coveralls.io/repos/hons82/THPDFKit/badge.svg)](https://coveralls.io/r/hons82/THPDFKit) 9 | 10 | PDF viewer component on top of Apples PDFKit 11 | 12 | # Screenshots 13 | 14 | ![iPhone Portrait](/Screenshots/Screenshot1.png?raw=true) 15 | ![iPhone Landscape](/Screenshots/Screenshot2.png?raw=true) 16 | 17 | # Installation 18 | 19 | ### CocoaPods 20 | 21 | Install with [CocoaPods](http://cocoapods.org) by adding the following to your Podfile: 22 | 23 | ``` ruby 24 | platform :ios, '9.0' 25 | use_frameworks! 26 | pod 'THPDFKit', '~> 0.3.1' 27 | ``` 28 | 29 | **Note**: We follow http://semver.org for versioning the public API. 30 | 31 | # Usage 32 | 33 | This is a sample initialization taken from the sample project which uses storyboards to define viewcontrollers and navigation. 34 | 35 | However the only thing that is really needed is passing the URL to the PDF file to the Wrapper (If you wanna use the Quicklook fallback) or directly to the `PDFKitViewController` if you're not targeting platforms below iOS11. 36 | 37 | ```swift 38 | // MARK: - Navigation 39 | 40 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 41 | if let indexPath = tableView.indexPathForSelectedRow { 42 | let selectedRow = indexPath.row 43 | let detailVC = segue.destination as! PDFViewControllerWrapper 44 | detailVC.url = self.samplePDFs[selectedRow] 45 | 46 | } 47 | } 48 | ``` 49 | # TODOs 50 | 51 | - Finally fix the broken TravisCI integration 52 | - Support for annotations 53 | - Improve podspec for iOS11 only version without Quicklook 54 | - Extend customizability (colors, sizes, fonts, ...) 55 | - Support for CocoaLumberjack (for logging) 56 | 57 | # Contributions 58 | 59 | ...are really welcome. If you have an idea just fork the library change it and if its useful for others and not affecting the functionality of the library for other users I'll insert it 60 | 61 | # License 62 | 63 | Source code of this project is available under the standard MIT license. Please see [the license file](LICENSE.md). -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | desc 'Run tests' 2 | task :test do 3 | command = "xcodebuild \ 4 | -workspace THPDFKit.xcworkspace \ 5 | -scheme THPDFKitDemo \ 6 | -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8,OS=latest' \ 7 | test" 8 | system(command) or exit 1 9 | end 10 | 11 | task :default => :test 12 | -------------------------------------------------------------------------------- /Screenshots/Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/Screenshots/Screenshot1.png -------------------------------------------------------------------------------- /Screenshots/Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/Screenshots/Screenshot2.png -------------------------------------------------------------------------------- /THPDFKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "THPDFKit" 3 | s.version = "0.3.2" 4 | s.summary = "PDF viewer component on top of Apples PDFKit" 5 | s.description = <<-DESC 6 | PDF viewer component on top of Apples PDFKit. 7 | As a fallback for older iOS versions this library is using QuickLook 8 | DESC 9 | s.homepage = "https://github.com/hons82/THPDFKit" 10 | s.license = { :type => "MIT", :file => "LICENSE.md" } 11 | s.author = { "Hannes Tribus" => "hons82@gmail.com" } 12 | s.ios.deployment_target = "9.0" 13 | s.requires_arc = true 14 | s.source = { :git => "https://github.com/hons82/THPDFKit.git", :tag => "#{s.version}" } 15 | s.source_files = "THPDFKit/THPDFKit/**/*.{swift}" 16 | s.resources = "THPDFKit/THPDFKit/Assets.xcassets" 17 | s.framework = 'PDFKit' 18 | s.framework = 'QuickLook' 19 | s.framework = 'UIKit' 20 | s.swift_version = '4.0' 21 | # s.dependency "CocoaLumberjack", "~> 3" 22 | end 23 | -------------------------------------------------------------------------------- /THPDFKit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 9950A09D2029A3ED00DC305C /* THPDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9950A0932029A3ED00DC305C /* THPDFKit.framework */; }; 11 | 9950A0A22029A3ED00DC305C /* THPDFKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0A12029A3ED00DC305C /* THPDFKitTests.swift */; }; 12 | 9950A0A42029A3ED00DC305C /* THPDFKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 9950A0962029A3ED00DC305C /* THPDFKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 9950A0F52029A48300DC305C /* PDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9950A0F42029A48300DC305C /* PDFKit.framework */; }; 14 | 9950A0F72029A48900DC305C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9950A0F62029A48900DC305C /* UIKit.framework */; }; 15 | 9950A1022029A4C100DC305C /* SearchTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0FB2029A4C100DC305C /* SearchTableViewController.swift */; }; 16 | 9950A1032029A4C100DC305C /* OutlineTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0FC2029A4C100DC305C /* OutlineTableViewCell.swift */; }; 17 | 9950A1042029A4C100DC305C /* OutlineTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0FD2029A4C100DC305C /* OutlineTableViewController.swift */; }; 18 | 9950A1052029A4C100DC305C /* SearchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0FE2029A4C100DC305C /* SearchTableViewCell.swift */; }; 19 | 9950A1062029A4C100DC305C /* ThumbnailCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0FF2029A4C100DC305C /* ThumbnailCollectionViewCell.swift */; }; 20 | 9950A1072029A4C100DC305C /* ThumbnailCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A1002029A4C100DC305C /* ThumbnailCollectionViewController.swift */; }; 21 | 9950A1082029A4C100DC305C /* PDFViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A1012029A4C100DC305C /* PDFViewController.swift */; }; 22 | 9950A10A2029A4DD00DC305C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9950A1092029A4DD00DC305C /* Assets.xcassets */; }; 23 | 999A3308202B570E00705322 /* QLViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999A3307202B570E00705322 /* QLViewController.swift */; }; 24 | 999A330B202B572A00705322 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 999A330A202B572A00705322 /* QuickLook.framework */; }; 25 | 999A330D202B585F00705322 /* PDFKitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999A330C202B585F00705322 /* PDFKitViewController.swift */; }; 26 | 999A330F202B620B00705322 /* PinHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999A330E202B620B00705322 /* PinHelper.swift */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 9950A09E2029A3ED00DC305C /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 9950A08A2029A3ED00DC305C /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 9950A0922029A3ED00DC305C; 35 | remoteInfo = THPDFKit; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 9950A0932029A3ED00DC305C /* THPDFKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = THPDFKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 9950A0962029A3ED00DC305C /* THPDFKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = THPDFKit.h; sourceTree = ""; }; 42 | 9950A0972029A3ED00DC305C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 9950A09C2029A3ED00DC305C /* THPDFKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = THPDFKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 9950A0A12029A3ED00DC305C /* THPDFKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = THPDFKitTests.swift; sourceTree = ""; }; 45 | 9950A0A32029A3ED00DC305C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 9950A0F42029A48300DC305C /* PDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PDFKit.framework; path = System/Library/Frameworks/PDFKit.framework; sourceTree = SDKROOT; }; 47 | 9950A0F62029A48900DC305C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 9950A0FB2029A4C100DC305C /* SearchTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchTableViewController.swift; sourceTree = ""; }; 49 | 9950A0FC2029A4C100DC305C /* OutlineTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OutlineTableViewCell.swift; sourceTree = ""; }; 50 | 9950A0FD2029A4C100DC305C /* OutlineTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OutlineTableViewController.swift; sourceTree = ""; }; 51 | 9950A0FE2029A4C100DC305C /* SearchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchTableViewCell.swift; sourceTree = ""; }; 52 | 9950A0FF2029A4C100DC305C /* ThumbnailCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThumbnailCollectionViewCell.swift; sourceTree = ""; }; 53 | 9950A1002029A4C100DC305C /* ThumbnailCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThumbnailCollectionViewController.swift; sourceTree = ""; }; 54 | 9950A1012029A4C100DC305C /* PDFViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PDFViewController.swift; sourceTree = ""; }; 55 | 9950A1092029A4DD00DC305C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 999A3307202B570E00705322 /* QLViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QLViewController.swift; sourceTree = ""; }; 57 | 999A330A202B572A00705322 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; }; 58 | 999A330C202B585F00705322 /* PDFKitViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PDFKitViewController.swift; sourceTree = ""; }; 59 | 999A330E202B620B00705322 /* PinHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinHelper.swift; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 9950A08F2029A3ED00DC305C /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 999A330B202B572A00705322 /* QuickLook.framework in Frameworks */, 68 | 9950A0F72029A48900DC305C /* UIKit.framework in Frameworks */, 69 | 9950A0F52029A48300DC305C /* PDFKit.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 9950A0992029A3ED00DC305C /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 9950A09D2029A3ED00DC305C /* THPDFKit.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 9950A0892029A3ED00DC305C = { 85 | isa = PBXGroup; 86 | children = ( 87 | 9950A0952029A3ED00DC305C /* THPDFKit */, 88 | 9950A0A02029A3ED00DC305C /* THPDFKitTests */, 89 | 9950A0942029A3ED00DC305C /* Products */, 90 | 9950A0F32029A48300DC305C /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 9950A0942029A3ED00DC305C /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 9950A0932029A3ED00DC305C /* THPDFKit.framework */, 98 | 9950A09C2029A3ED00DC305C /* THPDFKitTests.xctest */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 9950A0952029A3ED00DC305C /* THPDFKit */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 9950A0962029A3ED00DC305C /* THPDFKit.h */, 107 | 9950A0972029A3ED00DC305C /* Info.plist */, 108 | 9950A0FC2029A4C100DC305C /* OutlineTableViewCell.swift */, 109 | 9950A0FD2029A4C100DC305C /* OutlineTableViewController.swift */, 110 | 999A330C202B585F00705322 /* PDFKitViewController.swift */, 111 | 9950A1012029A4C100DC305C /* PDFViewController.swift */, 112 | 9950A0FE2029A4C100DC305C /* SearchTableViewCell.swift */, 113 | 9950A0FB2029A4C100DC305C /* SearchTableViewController.swift */, 114 | 9950A0FF2029A4C100DC305C /* ThumbnailCollectionViewCell.swift */, 115 | 9950A1002029A4C100DC305C /* ThumbnailCollectionViewController.swift */, 116 | 9950A1092029A4DD00DC305C /* Assets.xcassets */, 117 | 999A3309202B571300705322 /* Legacy */, 118 | 999A3310202B621000705322 /* Utils */, 119 | ); 120 | path = THPDFKit; 121 | sourceTree = ""; 122 | }; 123 | 9950A0A02029A3ED00DC305C /* THPDFKitTests */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 9950A0A12029A3ED00DC305C /* THPDFKitTests.swift */, 127 | 9950A0A32029A3ED00DC305C /* Info.plist */, 128 | ); 129 | path = THPDFKitTests; 130 | sourceTree = ""; 131 | }; 132 | 9950A0F32029A48300DC305C /* Frameworks */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 999A330A202B572A00705322 /* QuickLook.framework */, 136 | 9950A0F62029A48900DC305C /* UIKit.framework */, 137 | 9950A0F42029A48300DC305C /* PDFKit.framework */, 138 | ); 139 | name = Frameworks; 140 | sourceTree = ""; 141 | }; 142 | 999A3309202B571300705322 /* Legacy */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 999A3307202B570E00705322 /* QLViewController.swift */, 146 | ); 147 | path = Legacy; 148 | sourceTree = ""; 149 | }; 150 | 999A3310202B621000705322 /* Utils */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 999A330E202B620B00705322 /* PinHelper.swift */, 154 | ); 155 | path = Utils; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXGroup section */ 159 | 160 | /* Begin PBXHeadersBuildPhase section */ 161 | 9950A0902029A3ED00DC305C /* Headers */ = { 162 | isa = PBXHeadersBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | 9950A0A42029A3ED00DC305C /* THPDFKit.h in Headers */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXHeadersBuildPhase section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | 9950A0922029A3ED00DC305C /* THPDFKit */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 9950A0A72029A3ED00DC305C /* Build configuration list for PBXNativeTarget "THPDFKit" */; 175 | buildPhases = ( 176 | 9950A08E2029A3ED00DC305C /* Sources */, 177 | 9950A08F2029A3ED00DC305C /* Frameworks */, 178 | 9950A0902029A3ED00DC305C /* Headers */, 179 | 9950A0912029A3ED00DC305C /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = THPDFKit; 186 | productName = THPDFKit; 187 | productReference = 9950A0932029A3ED00DC305C /* THPDFKit.framework */; 188 | productType = "com.apple.product-type.framework"; 189 | }; 190 | 9950A09B2029A3ED00DC305C /* THPDFKitTests */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = 9950A0AA2029A3ED00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitTests" */; 193 | buildPhases = ( 194 | 9950A0982029A3ED00DC305C /* Sources */, 195 | 9950A0992029A3ED00DC305C /* Frameworks */, 196 | 9950A09A2029A3ED00DC305C /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | 9950A09F2029A3ED00DC305C /* PBXTargetDependency */, 202 | ); 203 | name = THPDFKitTests; 204 | productName = THPDFKitTests; 205 | productReference = 9950A09C2029A3ED00DC305C /* THPDFKitTests.xctest */; 206 | productType = "com.apple.product-type.bundle.unit-test"; 207 | }; 208 | /* End PBXNativeTarget section */ 209 | 210 | /* Begin PBXProject section */ 211 | 9950A08A2029A3ED00DC305C /* Project object */ = { 212 | isa = PBXProject; 213 | attributes = { 214 | LastSwiftUpdateCheck = 0920; 215 | LastUpgradeCheck = 0920; 216 | ORGANIZATIONNAME = 3Bus; 217 | TargetAttributes = { 218 | 9950A0922029A3ED00DC305C = { 219 | CreatedOnToolsVersion = 9.2; 220 | LastSwiftMigration = 0920; 221 | ProvisioningStyle = Automatic; 222 | }; 223 | 9950A09B2029A3ED00DC305C = { 224 | CreatedOnToolsVersion = 9.2; 225 | ProvisioningStyle = Automatic; 226 | }; 227 | }; 228 | }; 229 | buildConfigurationList = 9950A08D2029A3ED00DC305C /* Build configuration list for PBXProject "THPDFKit" */; 230 | compatibilityVersion = "Xcode 8.0"; 231 | developmentRegion = en; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | ); 236 | mainGroup = 9950A0892029A3ED00DC305C; 237 | productRefGroup = 9950A0942029A3ED00DC305C /* Products */; 238 | projectDirPath = ""; 239 | projectRoot = ""; 240 | targets = ( 241 | 9950A0922029A3ED00DC305C /* THPDFKit */, 242 | 9950A09B2029A3ED00DC305C /* THPDFKitTests */, 243 | ); 244 | }; 245 | /* End PBXProject section */ 246 | 247 | /* Begin PBXResourcesBuildPhase section */ 248 | 9950A0912029A3ED00DC305C /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 9950A10A2029A4DD00DC305C /* Assets.xcassets in Resources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | 9950A09A2029A3ED00DC305C /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXResourcesBuildPhase section */ 264 | 265 | /* Begin PBXSourcesBuildPhase section */ 266 | 9950A08E2029A3ED00DC305C /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 9950A1032029A4C100DC305C /* OutlineTableViewCell.swift in Sources */, 271 | 999A330F202B620B00705322 /* PinHelper.swift in Sources */, 272 | 9950A1052029A4C100DC305C /* SearchTableViewCell.swift in Sources */, 273 | 999A330D202B585F00705322 /* PDFKitViewController.swift in Sources */, 274 | 9950A1022029A4C100DC305C /* SearchTableViewController.swift in Sources */, 275 | 9950A1062029A4C100DC305C /* ThumbnailCollectionViewCell.swift in Sources */, 276 | 9950A1042029A4C100DC305C /* OutlineTableViewController.swift in Sources */, 277 | 999A3308202B570E00705322 /* QLViewController.swift in Sources */, 278 | 9950A1082029A4C100DC305C /* PDFViewController.swift in Sources */, 279 | 9950A1072029A4C100DC305C /* ThumbnailCollectionViewController.swift in Sources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | 9950A0982029A3ED00DC305C /* Sources */ = { 284 | isa = PBXSourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | 9950A0A22029A3ED00DC305C /* THPDFKitTests.swift in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | /* End PBXSourcesBuildPhase section */ 292 | 293 | /* Begin PBXTargetDependency section */ 294 | 9950A09F2029A3ED00DC305C /* PBXTargetDependency */ = { 295 | isa = PBXTargetDependency; 296 | target = 9950A0922029A3ED00DC305C /* THPDFKit */; 297 | targetProxy = 9950A09E2029A3ED00DC305C /* PBXContainerItemProxy */; 298 | }; 299 | /* End PBXTargetDependency section */ 300 | 301 | /* Begin XCBuildConfiguration section */ 302 | 9950A0A52029A3ED00DC305C /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 308 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 309 | CLANG_CXX_LIBRARY = "libc++"; 310 | CLANG_ENABLE_MODULES = YES; 311 | CLANG_ENABLE_OBJC_ARC = YES; 312 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 313 | CLANG_WARN_BOOL_CONVERSION = YES; 314 | CLANG_WARN_COMMA = YES; 315 | CLANG_WARN_CONSTANT_CONVERSION = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 318 | CLANG_WARN_EMPTY_BODY = YES; 319 | CLANG_WARN_ENUM_CONVERSION = YES; 320 | CLANG_WARN_INFINITE_RECURSION = YES; 321 | CLANG_WARN_INT_CONVERSION = YES; 322 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | CODE_SIGN_IDENTITY = "iPhone Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | CURRENT_PROJECT_VERSION = 1; 334 | DEBUG_INFORMATION_FORMAT = dwarf; 335 | ENABLE_STRICT_OBJC_MSGSEND = YES; 336 | ENABLE_TESTABILITY = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu11; 338 | GCC_DYNAMIC_NO_PIC = NO; 339 | GCC_NO_COMMON_BLOCKS = YES; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREPROCESSOR_DEFINITIONS = ( 342 | "DEBUG=1", 343 | "$(inherited)", 344 | ); 345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 346 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 347 | GCC_WARN_UNDECLARED_SELECTOR = YES; 348 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 349 | GCC_WARN_UNUSED_FUNCTION = YES; 350 | GCC_WARN_UNUSED_VARIABLE = YES; 351 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 352 | MTL_ENABLE_DEBUG_INFO = YES; 353 | ONLY_ACTIVE_ARCH = YES; 354 | SDKROOT = iphoneos; 355 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 356 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 357 | VERSIONING_SYSTEM = "apple-generic"; 358 | VERSION_INFO_PREFIX = ""; 359 | }; 360 | name = Debug; 361 | }; 362 | 9950A0A62029A3ED00DC305C /* Release */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | ALWAYS_SEARCH_USER_PATHS = NO; 366 | CLANG_ANALYZER_NONNULL = YES; 367 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 369 | CLANG_CXX_LIBRARY = "libc++"; 370 | CLANG_ENABLE_MODULES = YES; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 373 | CLANG_WARN_BOOL_CONVERSION = YES; 374 | CLANG_WARN_COMMA = YES; 375 | CLANG_WARN_CONSTANT_CONVERSION = YES; 376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 377 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 378 | CLANG_WARN_EMPTY_BODY = YES; 379 | CLANG_WARN_ENUM_CONVERSION = YES; 380 | CLANG_WARN_INFINITE_RECURSION = YES; 381 | CLANG_WARN_INT_CONVERSION = YES; 382 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 386 | CLANG_WARN_STRICT_PROTOTYPES = YES; 387 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 388 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 389 | CLANG_WARN_UNREACHABLE_CODE = YES; 390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 391 | CODE_SIGN_IDENTITY = "iPhone Developer"; 392 | COPY_PHASE_STRIP = NO; 393 | CURRENT_PROJECT_VERSION = 1; 394 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 395 | ENABLE_NS_ASSERTIONS = NO; 396 | ENABLE_STRICT_OBJC_MSGSEND = YES; 397 | GCC_C_LANGUAGE_STANDARD = gnu11; 398 | GCC_NO_COMMON_BLOCKS = YES; 399 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 400 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 401 | GCC_WARN_UNDECLARED_SELECTOR = YES; 402 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 403 | GCC_WARN_UNUSED_FUNCTION = YES; 404 | GCC_WARN_UNUSED_VARIABLE = YES; 405 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 406 | MTL_ENABLE_DEBUG_INFO = NO; 407 | SDKROOT = iphoneos; 408 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 409 | VALIDATE_PRODUCT = YES; 410 | VERSIONING_SYSTEM = "apple-generic"; 411 | VERSION_INFO_PREFIX = ""; 412 | }; 413 | name = Release; 414 | }; 415 | 9950A0A82029A3ED00DC305C /* Debug */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | CLANG_ENABLE_MODULES = YES; 419 | CODE_SIGN_IDENTITY = ""; 420 | CODE_SIGN_STYLE = Automatic; 421 | DEFINES_MODULE = YES; 422 | DEVELOPMENT_TEAM = QWP2E983M5; 423 | DYLIB_COMPATIBILITY_VERSION = 1; 424 | DYLIB_CURRENT_VERSION = 1; 425 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 426 | INFOPLIST_FILE = THPDFKit/Info.plist; 427 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 428 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 429 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKit; 430 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 431 | SKIP_INSTALL = YES; 432 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 433 | SWIFT_VERSION = 4.0; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | }; 436 | name = Debug; 437 | }; 438 | 9950A0A92029A3ED00DC305C /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | CLANG_ENABLE_MODULES = YES; 442 | CODE_SIGN_IDENTITY = ""; 443 | CODE_SIGN_STYLE = Automatic; 444 | DEFINES_MODULE = YES; 445 | DEVELOPMENT_TEAM = QWP2E983M5; 446 | DYLIB_COMPATIBILITY_VERSION = 1; 447 | DYLIB_CURRENT_VERSION = 1; 448 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 449 | INFOPLIST_FILE = THPDFKit/Info.plist; 450 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 452 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKit; 453 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 454 | SKIP_INSTALL = YES; 455 | SWIFT_VERSION = 4.0; 456 | TARGETED_DEVICE_FAMILY = "1,2"; 457 | }; 458 | name = Release; 459 | }; 460 | 9950A0AB2029A3ED00DC305C /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 464 | CODE_SIGN_STYLE = Automatic; 465 | DEVELOPMENT_TEAM = QWP2E983M5; 466 | INFOPLIST_FILE = THPDFKitTests/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 468 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitTests; 469 | PRODUCT_NAME = "$(TARGET_NAME)"; 470 | SWIFT_VERSION = 4.0; 471 | TARGETED_DEVICE_FAMILY = "1,2"; 472 | }; 473 | name = Debug; 474 | }; 475 | 9950A0AC2029A3ED00DC305C /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 479 | CODE_SIGN_STYLE = Automatic; 480 | DEVELOPMENT_TEAM = QWP2E983M5; 481 | INFOPLIST_FILE = THPDFKitTests/Info.plist; 482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 483 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitTests; 484 | PRODUCT_NAME = "$(TARGET_NAME)"; 485 | SWIFT_VERSION = 4.0; 486 | TARGETED_DEVICE_FAMILY = "1,2"; 487 | }; 488 | name = Release; 489 | }; 490 | /* End XCBuildConfiguration section */ 491 | 492 | /* Begin XCConfigurationList section */ 493 | 9950A08D2029A3ED00DC305C /* Build configuration list for PBXProject "THPDFKit" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 9950A0A52029A3ED00DC305C /* Debug */, 497 | 9950A0A62029A3ED00DC305C /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | defaultConfigurationName = Release; 501 | }; 502 | 9950A0A72029A3ED00DC305C /* Build configuration list for PBXNativeTarget "THPDFKit" */ = { 503 | isa = XCConfigurationList; 504 | buildConfigurations = ( 505 | 9950A0A82029A3ED00DC305C /* Debug */, 506 | 9950A0A92029A3ED00DC305C /* Release */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | 9950A0AA2029A3ED00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitTests" */ = { 512 | isa = XCConfigurationList; 513 | buildConfigurations = ( 514 | 9950A0AB2029A3ED00DC305C /* Debug */, 515 | 9950A0AC2029A3ED00DC305C /* Release */, 516 | ); 517 | defaultConfigurationIsVisible = 0; 518 | defaultConfigurationName = Release; 519 | }; 520 | /* End XCConfigurationList section */ 521 | }; 522 | rootObject = 9950A08A2029A3ED00DC305C /* Project object */; 523 | } 524 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "arrow_down.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "arrow_down@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "arrow_down@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_down.imageset/arrow_down@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "arrow_right.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "arrow_right@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "arrow_right@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/arrow_right.imageset/arrow_right@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "btn-bookmark-active.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "btn-bookmark-active@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "btn-bookmark-active@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark-active.imageset/btn-bookmark-active@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "btn-bookmark.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "btn-bookmark@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "btn-bookmark@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-bookmark.imageset/btn-bookmark@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "outline.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "outline@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "outline@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-outline.imageset/outline@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "search.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "search@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "search@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-search.imageset/search@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "thumbnails.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "thumbnails@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "thumbnails@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/btn-thumbnails.imageset/thumbnails@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "edit-annotations.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "edit-annotations@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "edit-annotations@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations@2x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKit/THPDFKit/Assets.xcassets/edit-annotations.imageset/edit-annotations@3x.png -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Legacy/QLViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QLViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 07/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuickLook 11 | 12 | class QLViewController: QLPreviewController, PDFViewController { 13 | 14 | open var url: URL? { 15 | didSet{ 16 | if let url = url { 17 | urls = [url] 18 | } 19 | } 20 | } 21 | 22 | lazy var urls = [URL]() 23 | 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | 27 | dataSource = self 28 | } 29 | 30 | // MARK: - PDFViewController 31 | 32 | public func go(to page: Int) { 33 | print("Quicklook does not support this feature") 34 | } 35 | 36 | } 37 | 38 | extension QLViewController: QLPreviewControllerDataSource { 39 | 40 | func numberOfPreviewItems(in controller: QLPreviewController) -> Int { 41 | return urls.count 42 | } 43 | 44 | func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { 45 | print("Show item at \(index) which will be \(urls[index].absoluteString)") 46 | return NSURL(string: (urls[index].absoluteString))! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/OutlineTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineTableViewCell.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 02/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class OutlineTableViewCell: UITableViewCell { 12 | 13 | lazy var openButton: UIButton = { 14 | let button = UIButton(type: .custom) 15 | button.translatesAutoresizingMaskIntoConstraints = false 16 | button.addTarget(self, action: #selector(openButtonClick(_:)), for: .touchUpInside) 17 | button.backgroundColor = .clear 18 | 19 | return button 20 | }() 21 | 22 | lazy var outlineTextLabel: UILabel = { 23 | let label = UILabel() 24 | label.translatesAutoresizingMaskIntoConstraints = false 25 | label.backgroundColor = .clear 26 | 27 | return label 28 | }() 29 | 30 | lazy var pageLabel: UILabel = { 31 | let label = UILabel() 32 | label.translatesAutoresizingMaskIntoConstraints = false 33 | label.textAlignment = .right 34 | label.backgroundColor = .clear 35 | 36 | return label 37 | }() 38 | 39 | var openButtonClick:((_ sender: UIButton) -> Void)? 40 | 41 | required init?(coder aDecoder: NSCoder) { 42 | super.init(coder: aDecoder) 43 | } 44 | 45 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) { 46 | super.init(style: style, reuseIdentifier: reuseIdentifier) 47 | 48 | [self.openButton, self.outlineTextLabel, self.pageLabel].forEach({ self.contentView.addSubview($0) }) 49 | 50 | NSLayoutConstraint.activate ( 51 | NSLayoutConstraint.constraints(withVisualFormat: "H:|-[openButton(==44)]-[outlineTextLabel]-[pageLabel]-|", options: [], metrics: nil, views: ["openButton": self.openButton, "outlineTextLabel": self.outlineTextLabel, "pageLabel": self.pageLabel]) + 52 | NSLayoutConstraint.constraints(withVisualFormat: "V:|[openButton(==44)]|", options: [], metrics: nil, views: ["openButton": self.openButton]) 53 | ) 54 | 55 | self.contentView.addConstraint(NSLayoutConstraint(item: self.outlineTextLabel, attribute: .height, relatedBy: .equal, toItem: self.contentView, attribute: .height, multiplier: 1, constant: 0) ) 56 | self.contentView.addConstraint(NSLayoutConstraint(item: self.pageLabel, attribute: .height, relatedBy: .equal, toItem: self.contentView, attribute: .height, multiplier: 1, constant: 0) ) 57 | 58 | indentationWidth = 16.0 59 | } 60 | 61 | override func layoutSubviews() { 62 | super.layoutSubviews() 63 | if indentationLevel == 0 { 64 | outlineTextLabel.font = UIFont.systemFont(ofSize: 17) 65 | pageLabel.font = UIFont.systemFont(ofSize: 17) 66 | } else { 67 | outlineTextLabel.font = UIFont.systemFont(ofSize: 15) 68 | pageLabel.font = UIFont.systemFont(ofSize: 15) 69 | } 70 | 71 | self.contentView.layoutMargins.left = CGFloat(self.indentationLevel) * self.indentationWidth 72 | self.contentView.layoutIfNeeded() 73 | } 74 | 75 | @IBAction func openButtonClick(_ sender: UIButton) { 76 | sender.isSelected = !sender.isSelected 77 | openButtonClick?(sender) 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/OutlineTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineTableViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 02/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import PDFKit 11 | 12 | @available(iOS 11.0, *) 13 | protocol OutlineTableViewControllerDelegate: class{ 14 | func outlineTableViewController(_ outlineTableViewController: OutlineTableViewController, didSelectOutline outline: PDFOutline) 15 | } 16 | 17 | @available(iOS 11.0, *) 18 | class OutlineTableViewController: UITableViewController { 19 | 20 | private struct WrappedBundleImage: _ExpressibleByImageLiteral { 21 | let image: UIImage 22 | 23 | init(imageLiteralResourceName name: String) { 24 | let bundle = Bundle(for: OutlineTableViewController.classForCoder()) 25 | image = UIImage(named: name, in: bundle, compatibleWith: nil)! 26 | } 27 | } 28 | 29 | let outlineTableViewCellReuseIdentifier = "OutlineTableViewCell" 30 | 31 | open var pdfOutlineRoot: PDFOutline? { 32 | didSet{ 33 | for index in 0...(pdfOutlineRoot?.numberOfChildren)!-1 { 34 | let pdfOutline = pdfOutlineRoot?.child(at: index) 35 | pdfOutline?.isOpen = false 36 | data.append(pdfOutline!) 37 | } 38 | tableView.reloadData() 39 | } 40 | } 41 | 42 | var data = [PDFOutline]() 43 | 44 | weak var delegate: OutlineTableViewControllerDelegate? 45 | 46 | override func viewDidLoad() { 47 | super.viewDidLoad() 48 | 49 | tableView.cellLayoutMarginsFollowReadableWidth = false 50 | tableView.rowHeight = UITableViewAutomaticDimension; 51 | tableView.estimatedRowHeight = 44.0; 52 | 53 | navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(closeBtnClick)) 54 | 55 | tableView.register(OutlineTableViewCell.classForCoder(), forCellReuseIdentifier: outlineTableViewCellReuseIdentifier) 56 | } 57 | 58 | @objc func closeBtnClick(sender: UIBarButtonItem) { 59 | dismiss(animated: false, completion: nil) 60 | } 61 | 62 | override func didReceiveMemoryWarning() { 63 | super.didReceiveMemoryWarning() 64 | // Dispose of any resources that can be recreated. 65 | } 66 | 67 | // MARK: - UITableViewDataSource 68 | 69 | override func numberOfSections(in tableView: UITableView) -> Int { 70 | return 1 71 | } 72 | 73 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 74 | return data.count 75 | } 76 | 77 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 78 | let cell = tableView.dequeueReusableCell(withIdentifier: outlineTableViewCellReuseIdentifier, for: indexPath) as! OutlineTableViewCell 79 | 80 | let outline = data[indexPath.row]; 81 | 82 | cell.outlineTextLabel.text = outline.label 83 | cell.pageLabel.text = outline.destination?.page?.label 84 | 85 | if outline.numberOfChildren > 0 { 86 | cell.openButton.setImage(((outline.isOpen ? #imageLiteral(resourceName: "arrow_down") : #imageLiteral(resourceName: "arrow_right")) as WrappedBundleImage).image, for: .normal) 87 | cell.openButton.isEnabled = true 88 | } else { 89 | cell.openButton.setImage(nil, for: .normal) 90 | cell.openButton.isEnabled = false 91 | } 92 | 93 | cell.openButtonClick = {[weak self] (sender)-> Void in 94 | if outline.numberOfChildren > 0 { 95 | if sender.isSelected { 96 | outline.isOpen = true 97 | self?.insertChildren(parent: outline) 98 | } else { 99 | outline.isOpen = false 100 | self?.removeChildren(parent: outline) 101 | } 102 | tableView.reloadData() 103 | } 104 | } 105 | return cell 106 | } 107 | 108 | override func tableView(_ tableView: UITableView, indentationLevelForRowAt indexPath: IndexPath) -> Int { 109 | let outline = data[indexPath.row]; 110 | let depth = findDepth(outline: outline) 111 | return depth; 112 | } 113 | 114 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 115 | let outline = data[indexPath.row] 116 | delegate?.outlineTableViewController(self, didSelectOutline: outline) 117 | dismiss(animated: false, completion: nil) 118 | } 119 | 120 | func findDepth(outline: PDFOutline) -> Int { 121 | var depth: Int = -1 122 | var tmp = outline 123 | while (tmp.parent != nil) { 124 | depth = depth + 1 125 | tmp = tmp.parent! 126 | } 127 | return depth 128 | } 129 | 130 | func insertChildren(parent: PDFOutline) { 131 | var tmpData: [PDFOutline] = [] 132 | let baseIndex = self.data.index(of: parent) 133 | for index in 0.. 0 { 151 | removeChildren(parent: node) 152 | 153 | // remove self 154 | if let i = data.index(of: node) { 155 | data.remove(at: i) 156 | } 157 | } else { 158 | if self.data.contains(node) { 159 | if let i = data.index(of: node) { 160 | data.remove(at: i) 161 | } 162 | } 163 | } 164 | } 165 | } 166 | } 167 | 168 | } 169 | 170 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/PDFKitViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PDFKitViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 31/01/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import PDFKit 11 | 12 | 13 | public struct PDFViewControllerConfiguration { 14 | 15 | public enum ThumbnailDisplayMode: Int { 16 | case overlay 17 | case fixed 18 | } 19 | 20 | // These are the default properties for a new configuration 21 | public let thumbnailDisplayMode: ThumbnailDisplayMode 22 | public let thumbnailSize: CGSize 23 | public let thumbnailViewHeight: CGFloat 24 | 25 | public init(thumbnailDisplayMode: ThumbnailDisplayMode? = nil, thumbnailSize: CGSize? = nil, thumbnailViewHeight: CGFloat? = nil) { 26 | self.thumbnailDisplayMode = thumbnailDisplayMode ?? .overlay 27 | self.thumbnailSize = thumbnailSize ?? CGSize(width: 50.0, height: 75.0) 28 | self.thumbnailViewHeight = thumbnailViewHeight ?? 100.0 29 | } 30 | 31 | } 32 | 33 | @available(iOS 11.0, *) 34 | open class PDFKitViewController: UIViewController, PDFViewController { 35 | 36 | open var url: URL? { 37 | didSet{ 38 | if let url = url { 39 | pdfdocument = PDFDocument(url: url) 40 | } 41 | } 42 | } 43 | 44 | var pdfdocument: PDFDocument? 45 | 46 | fileprivate lazy var pdfView: PDFView = { 47 | let view = PDFView() 48 | view.translatesAutoresizingMaskIntoConstraints = false 49 | view.delegate = self 50 | view.displayMode = .singlePage 51 | view.displaysAsBook = true 52 | view.displayDirection = .horizontal 53 | view.autoScales = true 54 | 55 | return view 56 | }() 57 | 58 | @objc open var currentPageIndex: Int { 59 | guard let currentPage = pdfView.currentPage, let pdfdocument = pdfdocument else { return -1 } 60 | 61 | return pdfdocument.index(for: currentPage) 62 | } 63 | 64 | @objc open lazy var tintColor: UIColor = self.view.tintColor 65 | 66 | private lazy var toolViewBackgroundView: UIView = { 67 | let view = UIView() 68 | view.translatesAutoresizingMaskIntoConstraints = false 69 | view.backgroundColor = UIColor.white.withAlphaComponent(0.8) 70 | view.layer.borderWidth = 1.0 71 | view.layer.borderColor = tintColor.cgColor 72 | view.layer.cornerRadius = 10.0 73 | 74 | return view 75 | }() 76 | 77 | fileprivate lazy var toolView: UIStackView = { 78 | let view = UIStackView() 79 | view.translatesAutoresizingMaskIntoConstraints = false 80 | view.axis = .horizontal 81 | view.alignment = .fill 82 | view.distribution = .equalSpacing 83 | view.spacing = 1.0 84 | view.pinBackground(toolViewBackgroundView) 85 | 86 | return view 87 | }() 88 | 89 | fileprivate lazy var thumbnailView: PDFThumbnailView = { 90 | let view = PDFThumbnailView() 91 | view.translatesAutoresizingMaskIntoConstraints = false 92 | view.layoutMode = .horizontal 93 | view.backgroundColor = UIColor.gray.withAlphaComponent(0.2) 94 | view.pdfView = self.pdfView 95 | view.thumbnailSize = configuration.thumbnailSize 96 | 97 | return view 98 | }() 99 | 100 | fileprivate lazy var thumbnailViewBottomContraint: NSLayoutConstraint = { 101 | return NSLayoutConstraint(item: self.thumbnailView, attribute: .bottom, relatedBy: .equal, toItem: self.view, attribute: .bottom, multiplier: 1, constant: 0) 102 | }() 103 | 104 | fileprivate lazy var thumbnailViewHeightContraint: NSLayoutConstraint = { 105 | return NSLayoutConstraint(item: self.thumbnailView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: self.configuration.thumbnailViewHeight) 106 | }() 107 | 108 | @objc open weak var delegate: PDFViewControllerDelegate? 109 | 110 | let configuration: PDFViewControllerConfiguration 111 | 112 | 113 | // MARK: - Initialization 114 | 115 | public init(configuration: PDFViewControllerConfiguration? = nil) { 116 | self.configuration = configuration ?? PDFViewControllerConfiguration() 117 | super.init(nibName: nil, bundle: nil) 118 | } 119 | 120 | required public init?(coder aDecoder: NSCoder) { 121 | self.configuration = PDFViewControllerConfiguration() 122 | super.init(coder: aDecoder) 123 | } 124 | 125 | // MARK: - ViewController Lifecycle 126 | 127 | override open func viewDidLoad() { 128 | super.viewDidLoad() 129 | 130 | pdfView.document = pdfdocument 131 | 132 | addToolButtons(stackView: toolView) 133 | 134 | [self.pdfView, self.toolView, self.thumbnailView].forEach({ self.view.addSubview($0) }) 135 | 136 | NSLayoutConstraint.activate( 137 | NSLayoutConstraint.constraints(withVisualFormat: "H:|-[pdfView]-|", options: [], metrics: nil, views: ["pdfView": self.pdfView]) + 138 | NSLayoutConstraint.constraints(withVisualFormat: "H:|[thumbnailView]|", options: [], metrics: nil, views: ["thumbnailView": self.thumbnailView]) + 139 | NSLayoutConstraint.constraints(withVisualFormat: "V:[toolView]-32-[thumbnailView]", options: [], metrics: nil, views: ["toolView": self.toolView, "thumbnailView": self.thumbnailView]) 140 | ) 141 | 142 | self.view.addConstraint(NSLayoutConstraint(item: self.toolView, attribute: .centerX, relatedBy: .equal, toItem: self.view, attribute: .centerX, multiplier: 1, constant: 0)) 143 | self.view.addConstraints([thumbnailViewHeightContraint]) 144 | 145 | if configuration.thumbnailDisplayMode == .overlay { 146 | NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "V:|-[pdfView]-|", options: [], metrics: nil, views: ["pdfView": self.pdfView])) 147 | 148 | self.view.addConstraints([thumbnailViewBottomContraint]) 149 | 150 | toolView.bringSubview(toFront: self.view) 151 | } 152 | else if configuration.thumbnailDisplayMode == .fixed { 153 | NSLayoutConstraint.activate( 154 | NSLayoutConstraint.constraints(withVisualFormat: "H:|[thumbnailView]|", options: [], metrics: nil, views: ["thumbnailView": self.thumbnailView]) + 155 | NSLayoutConstraint.constraints(withVisualFormat: "V:|-[pdfView]-[thumbnailView]|", options: [], metrics: nil, views: ["pdfView": self.pdfView, "thumbnailView": self.thumbnailView]) 156 | ) 157 | } 158 | 159 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapGesture(_:))) 160 | tapGesture.cancelsTouchesInView = false 161 | view.addGestureRecognizer(tapGesture) 162 | 163 | ([.right, .down, .left, .up] as [UISwipeGestureRecognizerDirection]).forEach({ 164 | let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(swipeGesture(_:))) 165 | swipeGesture.direction = $0 166 | swipeGesture.cancelsTouchesInView = false 167 | self.pdfView.addGestureRecognizer(swipeGesture) 168 | }) 169 | updateOrientation(landscape: UIApplication.shared.statusBarOrientation.isLandscape) 170 | } 171 | 172 | override open func viewDidAppear(_ animated: Bool) { 173 | super.viewDidAppear(animated) 174 | toggleToolView() 175 | hideThumbnailView() 176 | } 177 | 178 | override open func didReceiveMemoryWarning() { 179 | super.didReceiveMemoryWarning() 180 | } 181 | 182 | override open func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 183 | updateOrientation(landscape: UIDevice.current.orientation.isLandscape) 184 | } 185 | 186 | func addToolButtons(stackView: UIStackView) { 187 | let buttons: [[String: Any]] = [["imagename": "btn-thumbnails", "selector": #selector(thumbButtonClick(_:))], 188 | ["imagename": "btn-outline", "selector": #selector(outlineButtonClick(_:))], 189 | ["imagename": "btn-bookmark", "selector": #selector(bookmarkButtonClick(_:))], 190 | ["imagename": "btn-search", "selector": #selector(searchButtonClick(_:))]] 191 | for buttonDic in buttons { 192 | guard let imagename = buttonDic["imagename"] as? String, let selector = buttonDic["selector"] as? Selector else { 193 | print("coding error, buttons are wrong") 194 | continue 195 | } 196 | if stackView.arrangedSubviews.count > 0 { 197 | let view = UIView() 198 | view.backgroundColor = tintColor 199 | view.heightAnchor.constraint(equalToConstant: 44).isActive = true 200 | view.widthAnchor.constraint(equalToConstant: 1).isActive = true 201 | stackView.addArrangedSubview(view) 202 | } 203 | 204 | let button = UIButton(type: .custom) 205 | button.setImage(UIImage(named: imagename, in: Bundle(for: PDFKitViewController.classForCoder()), compatibleWith: nil)?.withRenderingMode(.alwaysTemplate), for: .normal) 206 | button.tintColor = tintColor 207 | button.heightAnchor.constraint(equalToConstant: 44).isActive = true 208 | button.widthAnchor.constraint(equalToConstant: 88).isActive = true 209 | button.addTarget(self, action: selector, for: .touchUpInside) 210 | button.backgroundColor = .clear 211 | stackView.addArrangedSubview(button) 212 | } 213 | } 214 | 215 | // MARK: - Button Actions 216 | 217 | @objc open func thumbButtonClick(_ sender: UIButton!) { 218 | let layout = UICollectionViewFlowLayout() 219 | layout.minimumInteritemSpacing = 10 220 | layout.minimumLineSpacing = 20 221 | 222 | let width = floor((min(view.frame.height, view.frame.width) - 10 * 4) / 3) 223 | let height = width * 1.3 224 | 225 | layout.itemSize = CGSize(width: width, height: height) 226 | layout.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10) 227 | 228 | let thumbnailCollectionViewController = ThumbnailCollectionViewController(collectionViewLayout: layout) 229 | thumbnailCollectionViewController.pdfDocument = pdfdocument 230 | thumbnailCollectionViewController.delegate = self 231 | 232 | let nav = UINavigationController(rootViewController: thumbnailCollectionViewController) 233 | self.present(nav, animated: false, completion:nil) 234 | } 235 | 236 | @objc open func outlineButtonClick(_ sender: UIButton) { 237 | if let pdfoutline = pdfdocument?.outlineRoot { 238 | let oulineViewController = OutlineTableViewController(style: UITableViewStyle.plain) 239 | oulineViewController.pdfOutlineRoot = pdfoutline 240 | oulineViewController.delegate = self 241 | 242 | let nav = UINavigationController(rootViewController: oulineViewController) 243 | self.present(nav, animated: false, completion:nil) 244 | } 245 | } 246 | 247 | @objc open func bookmarkButtonClick(_ sender: UIButton) { 248 | guard let page = pdfView.currentPage, let index = pdfdocument?.index(for: page), let pdfUrl = pdfdocument?.documentURL else { 249 | print("could not Bookmark page \(pdfView.currentPage?.label ?? "") of \(pdfdocument?.documentURL?.absoluteString ?? "")") 250 | return 251 | } 252 | print("Bookmark page \(index) in \(pdfUrl.absoluteString)") 253 | delegate?.pdfViewController(self, didBookmarkPage: index, inPdf: pdfUrl) 254 | } 255 | 256 | @objc open func searchButtonClick(_ sender: UIButton) { 257 | let searchViewController = SearchTableViewController() 258 | searchViewController.pdfDocument = pdfdocument 259 | searchViewController.delegate = self 260 | 261 | let nav = UINavigationController(rootViewController: searchViewController) 262 | nav.modalPresentationStyle = .fullScreen 263 | self.present(nav, animated: true, completion:nil) 264 | } 265 | 266 | // MARK: Gesture Actions 267 | 268 | @objc func swipeGesture(_ gestureRecognizer: UISwipeGestureRecognizer) { 269 | guard gestureRecognizer.state == .recognized else { 270 | print("Swipe state is not yet recognized") 271 | return 272 | } 273 | 274 | let location = gestureRecognizer.location(in: gestureRecognizer.view) 275 | switch gestureRecognizer.direction { 276 | case .right: 277 | if thumbnailViewBottomContraint.constant > 0 || location.y < pdfView.frame.size.height - thumbnailViewHeightContraint.constant { 278 | gotoPreviousPage() 279 | } 280 | case .down: 281 | hideThumbnailView() 282 | case .left: 283 | if thumbnailViewBottomContraint.constant > 0 || location.y < pdfView.frame.size.height - thumbnailViewHeightContraint.constant { 284 | gotoNextPage() 285 | } 286 | case .up: 287 | showThumbnailView() 288 | default: 289 | print("Swiped into n-dimensional space... probably") 290 | break 291 | } 292 | } 293 | 294 | @objc func tapGesture(_ gestureRecognizer: UITapGestureRecognizer) { 295 | guard gestureRecognizer.state == .recognized else { 296 | print("Touch state is not yet recognized") 297 | return 298 | } 299 | let location = gestureRecognizer.location(in: gestureRecognizer.view) 300 | let touchAreaWidth: CGFloat = 100 301 | if location.x < touchAreaWidth && (thumbnailViewBottomContraint.constant > 0 || location.y < pdfView.frame.size.height - thumbnailViewHeightContraint.constant){ 302 | gotoPreviousPage() 303 | } else if location.x > pdfView.frame.size.width - touchAreaWidth && (thumbnailViewBottomContraint.constant > 0 || location.y < pdfView.frame.size.height - thumbnailViewHeightContraint.constant) { 304 | gotoNextPage() 305 | } else if location.y > pdfView.frame.size.height - 22 { 306 | showThumbnailView() 307 | } else { 308 | toggleToolView() 309 | } 310 | } 311 | 312 | func gotoPreviousPage() { 313 | if pdfView.canGoToPreviousPage { 314 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { [weak self] in 315 | self?.pdfView.alpha = 0.0 316 | }, completion: { [weak self] (finished: Bool) in 317 | self?.hideThumbnailView() 318 | self?.pdfView.goToPreviousPage(self) 319 | if let scaleFactorForSizeToFit = self?.pdfView.scaleFactorForSizeToFit { 320 | self?.pdfView.scaleFactor = scaleFactorForSizeToFit 321 | } 322 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { 323 | self?.pdfView.alpha = 1.0 324 | }) 325 | }) 326 | } else { 327 | print("There is no previous page") 328 | } 329 | } 330 | 331 | func gotoNextPage() { 332 | if pdfView.canGoToNextPage { 333 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { [weak self] in 334 | self?.pdfView.alpha = 0.0 335 | }, completion: { [weak self] (finished: Bool) in 336 | self?.hideThumbnailView() 337 | self?.pdfView.goToNextPage(self) 338 | if let scaleFactorForSizeToFit = self?.pdfView.scaleFactorForSizeToFit { 339 | self?.pdfView.scaleFactor = scaleFactorForSizeToFit 340 | } 341 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { 342 | self?.pdfView.alpha = 1.0 343 | }) 344 | }) 345 | } else { 346 | print("There is no next page") 347 | } 348 | } 349 | 350 | func toggleToolView() { 351 | UIView.animate(withDuration: CATransaction.animationDuration()) { [weak self] in 352 | self?.toolView.alpha = 1 - (self?.toolView.alpha)! 353 | } 354 | } 355 | 356 | func hideThumbnailView() { 357 | guard thumbnailViewBottomContraint.constant == 0 else { 358 | return 359 | } 360 | thumbnailViewBottomContraint.constant = thumbnailView.frame.size.height 361 | UIView.animate(withDuration: CATransaction.animationDuration()) { [weak self] in 362 | self?.view.layoutIfNeeded() 363 | } 364 | } 365 | 366 | func showThumbnailView() { 367 | guard thumbnailViewBottomContraint.constant > 0 else { 368 | return 369 | } 370 | thumbnailViewBottomContraint.constant = 0 371 | UIView.animate(withDuration: CATransaction.animationDuration()) { [weak self] in 372 | self?.view.layoutIfNeeded() 373 | } 374 | } 375 | 376 | func updateOrientation(landscape isLandscape: Bool = true) { 377 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { [weak self] in 378 | self?.pdfView.alpha = 0.0 379 | }, completion: { [weak self] (finished: Bool) in 380 | self?.pdfView.displayMode = isLandscape ? .twoUp : .singlePage 381 | if let scaleFactorForSizeToFit = self?.pdfView.scaleFactorForSizeToFit { 382 | self?.pdfView.scaleFactor = scaleFactorForSizeToFit 383 | } 384 | UIView.animate(withDuration:CATransaction.animationDuration(), animations: { 385 | self?.pdfView.alpha = 1.0 386 | }) 387 | }) 388 | } 389 | 390 | // MARK: - PDFViewController 391 | 392 | public func go(to page: Int) { 393 | guard let pageCount = pdfdocument?.pageCount, pageCount > page else { 394 | print("Page is out of bounds") 395 | return 396 | } 397 | guard let pdfPage = pdfdocument?.page(at: page) else { 398 | print("Could not get page for index") 399 | return 400 | } 401 | pdfView.go(to: pdfPage) 402 | } 403 | 404 | } 405 | 406 | @available(iOS 11.0, *) 407 | extension PDFKitViewController: PDFViewDelegate { 408 | 409 | public func pdfViewWillClick(onLink sender: PDFView, with url: URL) { 410 | if let delegate = delegate { 411 | delegate.pdfViewController(self, willClickOnLink: url) 412 | } else { 413 | if UIApplication.shared.canOpenURL(url) { 414 | UIApplication.shared.openURL(url) 415 | } 416 | } 417 | } 418 | 419 | } 420 | 421 | @available(iOS 11.0, *) 422 | extension PDFKitViewController: OutlineTableViewControllerDelegate { 423 | 424 | func outlineTableViewController(_ outlineTableViewController: OutlineTableViewController, didSelectOutline outline: PDFOutline) { 425 | if let actiongoto = outline.action as? PDFActionGoTo { 426 | pdfView.go(to: actiongoto.destination) 427 | } 428 | } 429 | 430 | } 431 | 432 | @available(iOS 11.0, *) 433 | extension PDFKitViewController: ThumbnailCollectionViewControllerDelegate { 434 | 435 | func thumbnailCollectionViewController(_ thumbnailCollectionViewController: ThumbnailCollectionViewController, didSelectPage page: PDFPage) { 436 | pdfView.go(to: page) 437 | } 438 | 439 | } 440 | 441 | @available(iOS 11.0, *) 442 | extension PDFKitViewController: SearchTableViewControllerDelegate { 443 | 444 | func searchTableViewController(_ searchTableViewController: SearchTableViewController, didSelectSerchResult selection: PDFSelection) { 445 | selection.color = UIColor.yellow 446 | pdfView.currentSelection = selection 447 | pdfView.go(to: selection) 448 | } 449 | 450 | } 451 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/PDFViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PDFViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 31/01/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol PDFViewControllerDelegate: class { 12 | func pdfViewController(_ pdfViewController: PDFViewController, didBookmarkPage page: Int, inPdf url: URL) 13 | func pdfViewController(_ pdfViewController: PDFViewController, willClickOnLink url: URL) 14 | } 15 | 16 | @objc public protocol PDFViewController: class { 17 | var url: URL? { get set } 18 | func go(to page:Int) 19 | } 20 | 21 | open class PDFViewControllerWrapper: UIViewController, PDFViewController { 22 | 23 | let configuration: PDFViewControllerConfiguration? 24 | 25 | open var url: URL? { 26 | didSet{ 27 | if let url = url { 28 | activeViewController.url = url 29 | } 30 | } 31 | } 32 | 33 | static func factory(with configuration: PDFViewControllerConfiguration? = nil) -> PDFViewController { 34 | if #available(iOS 11.0, *) { 35 | return PDFKitViewController(configuration: configuration) 36 | } else { 37 | // Fallback on earlier versions 38 | return QLViewController() 39 | } 40 | } 41 | 42 | private var activeViewController: PDFViewController { 43 | didSet { 44 | removeInactiveViewController(inactiveViewController: oldValue) 45 | updateActiveViewController() 46 | } 47 | } 48 | 49 | init(configuration: PDFViewControllerConfiguration? = nil) { 50 | self.configuration = configuration 51 | self.activeViewController = PDFViewControllerWrapper.factory(with: configuration) 52 | 53 | super.init(nibName: nil, bundle: nil) 54 | } 55 | 56 | required public init?(coder aDecoder: NSCoder) { 57 | self.configuration = PDFViewControllerConfiguration() 58 | self.activeViewController = PDFViewControllerWrapper.factory(with: self.configuration) 59 | 60 | super.init(coder: aDecoder) 61 | } 62 | 63 | override open func viewDidLoad() { 64 | super.viewDidLoad() 65 | updateActiveViewController() 66 | } 67 | 68 | open func go(to page:Int) { 69 | activeViewController.go(to: page) 70 | } 71 | 72 | private func removeInactiveViewController(inactiveViewController: PDFViewController?) { 73 | if let inActiveVC = inactiveViewController as? UIViewController { 74 | // call before removing child view controller's view from hierarchy 75 | inActiveVC.willMove(toParentViewController: nil) 76 | 77 | inActiveVC.view.removeFromSuperview() 78 | 79 | // call after removing child view controller's view from hierarchy 80 | inActiveVC.removeFromParentViewController() 81 | } 82 | } 83 | 84 | private func updateActiveViewController() { 85 | if let activeVC = activeViewController as? UIViewController { 86 | // call before adding child view controller's view as subview 87 | addChildViewController(activeVC) 88 | 89 | activeVC.view.frame = view.bounds 90 | view.addSubview(activeVC.view) 91 | 92 | // call before adding child view controller's view as subview 93 | activeVC.didMove(toParentViewController: self) 94 | } 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/SearchTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchTableViewCell.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 01/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SearchTableViewCell: UITableViewCell { 12 | 13 | lazy var destinationLabel: UILabel = { 14 | let label = UILabel() 15 | label.translatesAutoresizingMaskIntoConstraints = false 16 | label.textAlignment = .right 17 | label.backgroundColor = UIColor.clear 18 | label.font = UIFont.boldSystemFont(ofSize: 17.0) 19 | 20 | return label 21 | }() 22 | 23 | lazy var resultTextLabel: UILabel = { 24 | let label = UILabel() 25 | label.translatesAutoresizingMaskIntoConstraints = false 26 | label.numberOfLines = 0 27 | label.backgroundColor = UIColor.clear 28 | label.font = UIFont.systemFont(ofSize: 17.0) 29 | 30 | return label 31 | }() 32 | 33 | required init?(coder aDecoder: NSCoder) { 34 | super.init(coder: aDecoder) 35 | } 36 | 37 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) { 38 | super.init(style: style, reuseIdentifier: reuseIdentifier) 39 | 40 | [self.destinationLabel, self.resultTextLabel].forEach({ self.contentView.addSubview($0) }) 41 | 42 | NSLayoutConstraint.activate ( 43 | NSLayoutConstraint.constraints(withVisualFormat: "H:|-[destinationLabel]-|", options: [], metrics: nil, views: ["destinationLabel": self.destinationLabel]) + 44 | NSLayoutConstraint.constraints(withVisualFormat: "H:|-[resultTextLabel]-|", options: [], metrics: nil, views: ["resultTextLabel": self.resultTextLabel]) + 45 | NSLayoutConstraint.constraints(withVisualFormat: "V:|-[destinationLabel]-[resultTextLabel]-|", options: [], metrics: nil, views: ["destinationLabel": self.destinationLabel, "resultTextLabel": self.resultTextLabel]) 46 | ) 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/SearchTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchTableViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 01/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import PDFKit 11 | 12 | @available(iOS 11.0, *) 13 | protocol SearchTableViewControllerDelegate: class { 14 | func searchTableViewController(_ searchTableViewController: SearchTableViewController, didSelectSerchResult selection: PDFSelection) 15 | } 16 | 17 | @available(iOS 11.0, *) 18 | class SearchTableViewController: UITableViewController { 19 | 20 | let searchTableViewCellReuseIdentifier = "SearchTableViewCell" 21 | 22 | fileprivate lazy var searchBar: UISearchBar = { 23 | let searchBar = UISearchBar() 24 | searchBar.delegate = self 25 | searchBar.showsCancelButton = true 26 | searchBar.searchBarStyle = .minimal 27 | 28 | return searchBar 29 | }() 30 | 31 | var searchResults = [PDFSelection]() 32 | 33 | open var pdfDocument: PDFDocument? 34 | weak var delegate: SearchTableViewControllerDelegate? 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | 39 | tableView.cellLayoutMarginsFollowReadableWidth = false 40 | 41 | navigationItem.titleView = searchBar 42 | navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelButtonClicked)) 43 | 44 | tableView.register(SearchTableViewCell.classForCoder(), forCellReuseIdentifier: searchTableViewCellReuseIdentifier) 45 | } 46 | 47 | override func viewWillAppear(_ animated: Bool) { 48 | super.viewWillAppear(animated) 49 | searchBar.becomeFirstResponder() 50 | } 51 | 52 | override func didReceiveMemoryWarning() { 53 | super.didReceiveMemoryWarning() 54 | // Dispose of any resources that can be recreated. 55 | } 56 | 57 | @objc func cancelButtonClicked(sender: UIBarButtonItem) { 58 | cancelPressed() 59 | } 60 | 61 | fileprivate func cancelPressed() { 62 | pdfDocument?.cancelFindString() 63 | dismiss(animated: true, completion: nil) 64 | } 65 | 66 | // MARK: - UITableViewDataSource 67 | 68 | override func numberOfSections(in tableView: UITableView) -> Int { 69 | return 1 70 | } 71 | 72 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 73 | // #warning Incomplete implementation, return the number of rows 74 | return searchResults.count 75 | } 76 | 77 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 78 | let cell = tableView.dequeueReusableCell(withIdentifier: searchTableViewCellReuseIdentifier, for: indexPath) as! SearchTableViewCell 79 | 80 | let selection = searchResults[indexPath.row] 81 | let page = selection.pages[0] 82 | let outline = pdfDocument?.outlineItem(for: selection) 83 | 84 | let outlintstr = outline?.label ?? "" 85 | let pagestr = page.label ?? "" 86 | let txt = outlintstr + " \(NSLocalizedString("Page", comment: "To be translated")): " + pagestr 87 | cell.destinationLabel.text = txt 88 | 89 | let extendSelection = selection.copy() as! PDFSelection 90 | extendSelection.extend(atStart: 10) 91 | extendSelection.extend(atEnd: 90) 92 | extendSelection.extendForLineBoundaries() 93 | 94 | let range = (extendSelection.string! as NSString).range(of: selection.string!, options: .caseInsensitive) 95 | let attrstr = NSMutableAttributedString(string: extendSelection.string!) 96 | attrstr.addAttribute(.backgroundColor, value: UIColor.yellow, range: range) 97 | 98 | cell.resultTextLabel.attributedText = attrstr 99 | 100 | return cell 101 | } 102 | 103 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 104 | let selection = searchResults[indexPath.row] 105 | 106 | delegate?.searchTableViewController(self, didSelectSerchResult: selection) 107 | dismiss(animated: false, completion: nil) 108 | } 109 | 110 | override func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 111 | searchBar.resignFirstResponder() 112 | } 113 | } 114 | 115 | @available(iOS 11.0, *) 116 | extension SearchTableViewController: UISearchBarDelegate { 117 | 118 | func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { 119 | searchBar.resignFirstResponder() 120 | } 121 | 122 | func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { 123 | cancelPressed() 124 | } 125 | 126 | func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { 127 | if searchText.count < 2 { 128 | return 129 | } 130 | 131 | searchResults.removeAll() 132 | tableView.reloadData() 133 | if let pdfDocument = pdfDocument { 134 | pdfDocument.cancelFindString() 135 | pdfDocument.delegate = self 136 | pdfDocument.beginFindString(searchText, withOptions: .caseInsensitive) 137 | } 138 | } 139 | 140 | } 141 | 142 | @available(iOS 11.0, *) 143 | extension SearchTableViewController: PDFDocumentDelegate { 144 | 145 | func didMatchString(_ instance: PDFSelection) { 146 | searchResults.append(instance) 147 | tableView.reloadData() 148 | } 149 | 150 | } 151 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/THPDFKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // THPDFKit.h 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for THPDFKit. 12 | FOUNDATION_EXPORT double THPDFKitVersionNumber; 13 | 14 | //! Project version string for THPDFKit. 15 | FOUNDATION_EXPORT const unsigned char THPDFKitVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/ThumbnailCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThumbnailCollectionViewCell.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 01/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ThumbnailCollectionViewCell: UICollectionViewCell { 12 | 13 | lazy var imageView: UIImageView = { 14 | let imageView = UIImageView() 15 | imageView.translatesAutoresizingMaskIntoConstraints = false 16 | 17 | return imageView 18 | }() 19 | 20 | lazy var pageLabel: UILabel = { 21 | let label = UILabel() 22 | label.translatesAutoresizingMaskIntoConstraints = false 23 | label.numberOfLines = 1 24 | label.backgroundColor = UIColor.darkGray.withAlphaComponent(0.8) 25 | label.font = UIFont.systemFont(ofSize: 15.0) 26 | label.textColor = .white 27 | label.textAlignment = .center 28 | label.layer.cornerRadius = 6.0 29 | label.layer.masksToBounds = true 30 | 31 | return label 32 | }() 33 | 34 | required init?(coder aDecoder: NSCoder) { 35 | super.init(coder: aDecoder) 36 | } 37 | 38 | override init(frame: CGRect) { 39 | super.init(frame: frame) 40 | 41 | [self.imageView, self.pageLabel].forEach({ self.contentView.addSubview($0) }) 42 | 43 | NSLayoutConstraint.activate ( 44 | NSLayoutConstraint.constraints(withVisualFormat: "H:|-[imageView]-|", options: [], metrics: nil, views: ["imageView": self.imageView]) + 45 | NSLayoutConstraint.constraints(withVisualFormat: "V:|-[imageView]-|", options: [], metrics: nil, views: ["imageView": self.imageView]) + 46 | NSLayoutConstraint.constraints(withVisualFormat: "H:[pageLabel(>=44)]", options: [], metrics: nil, views: ["pageLabel": self.pageLabel]) + 47 | NSLayoutConstraint.constraints(withVisualFormat: "V:[pageLabel(==22)]-16-|", options: [], metrics: nil, views: ["pageLabel": self.pageLabel]) 48 | ) 49 | 50 | self.addConstraint(NSLayoutConstraint(item: self.pageLabel, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0) ) 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/ThumbnailCollectionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThumbnailCollectionViewController.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 01/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import PDFKit 11 | 12 | @available(iOS 11.0, *) 13 | protocol ThumbnailCollectionViewControllerDelegate: class { 14 | func thumbnailCollectionViewController(_ thumbnailCollectionViewController: ThumbnailCollectionViewController, didSelectPage page: PDFPage) 15 | } 16 | 17 | @available(iOS 11.0, *) 18 | class ThumbnailCollectionViewController: UICollectionViewController, UICollectionViewDelegateFlowLayout { 19 | 20 | let thumbnailCollectionViewCellReuseIdentifier = "ThumbnailCollectionViewCell" 21 | 22 | open var pdfDocument: PDFDocument? 23 | weak var delegate: ThumbnailCollectionViewControllerDelegate? 24 | 25 | override func viewDidLoad() { 26 | super.viewDidLoad() 27 | 28 | navigationItem.title = NSLocalizedString("Thumbnails", comment: "To be translated") 29 | navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(closeBtnClick)) 30 | 31 | collectionView?.register(ThumbnailCollectionViewCell.classForCoder(), forCellWithReuseIdentifier: thumbnailCollectionViewCellReuseIdentifier) 32 | 33 | collectionView?.backgroundColor = UIColor.gray 34 | } 35 | 36 | override func didReceiveMemoryWarning() { 37 | super.didReceiveMemoryWarning() 38 | // Dispose of any resources that can be recreated. 39 | } 40 | 41 | @objc func closeBtnClick(sender: UIBarButtonItem) { 42 | dismiss(animated: false, completion: nil) 43 | } 44 | 45 | override func numberOfSections(in collectionView: UICollectionView) -> Int { 46 | return 1 47 | } 48 | 49 | 50 | override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 51 | return pdfDocument?.pageCount ?? 0 52 | } 53 | 54 | override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 55 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: thumbnailCollectionViewCellReuseIdentifier, for: indexPath) as! ThumbnailCollectionViewCell 56 | 57 | if let page = pdfDocument?.page(at: indexPath.item) { 58 | cell.imageView.image = page.thumbnail(of: cell.bounds.size, for: PDFDisplayBox.cropBox) 59 | cell.pageLabel.text = page.label 60 | } 61 | 62 | return cell 63 | } 64 | 65 | override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 66 | if let page = pdfDocument?.page(at: indexPath.item) { 67 | dismiss(animated: false, completion: nil) 68 | delegate?.thumbnailCollectionViewController(self, didSelectPage: page) 69 | } 70 | } 71 | } 72 | 73 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKit/Utils/PinHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PinHelper.swift 3 | // THPDFKit 4 | // 5 | // Created by Hannes Tribus on 07/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIStackView { 12 | 13 | func pinBackground(_ view: UIView) { 14 | view.translatesAutoresizingMaskIntoConstraints = false 15 | insertSubview(view, at: 0) 16 | view.pin(to: self) 17 | } 18 | 19 | } 20 | 21 | extension UIView { 22 | 23 | public func pin(to view: UIView) { 24 | NSLayoutConstraint.activate([ 25 | leadingAnchor.constraint(equalTo: view.leadingAnchor), 26 | trailingAnchor.constraint(equalTo: view.trailingAnchor), 27 | topAnchor.constraint(equalTo: view.topAnchor), 28 | bottomAnchor.constraint(equalTo: view.bottomAnchor) 29 | ]) 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /THPDFKit/THPDFKitTests/THPDFKitTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // THPDFKitTests.swift 3 | // THPDFKitTests 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import THPDFKit 11 | 12 | class THPDFKitTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2159BAEB36B4EF91211F5E22 /* Pods_THPDFKitDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6533CFA5272A1F0F5B88E390 /* Pods_THPDFKitDemo.framework */; }; 11 | 5D41FC423B7A587D41F493E3 /* Pods_THPDFKitDemoTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7CB1FF7D80B2439C02B67C58 /* Pods_THPDFKitDemoTests.framework */; }; 12 | 9950A0BA2029A41B00DC305C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0B92029A41B00DC305C /* AppDelegate.swift */; }; 13 | 9950A0BF2029A41B00DC305C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9950A0BD2029A41B00DC305C /* Main.storyboard */; }; 14 | 9950A0C12029A41B00DC305C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9950A0C02029A41B00DC305C /* Assets.xcassets */; }; 15 | 9950A0C42029A41B00DC305C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9950A0C22029A41B00DC305C /* LaunchScreen.storyboard */; }; 16 | 9950A0CF2029A41B00DC305C /* THPDFKitDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0CE2029A41B00DC305C /* THPDFKitDemoTests.swift */; }; 17 | 9950A0DA2029A41B00DC305C /* THPDFKitDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A0D92029A41B00DC305C /* THPDFKitDemoUITests.swift */; }; 18 | 9950A1102029A5FE00DC305C /* PDFSelectionTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9950A10F2029A5FE00DC305C /* PDFSelectionTableViewController.swift */; }; 19 | 9950A1112029AAAB00DC305C /* THPDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9950A0FA2029A49300DC305C /* THPDFKit.framework */; }; 20 | 9950A1122029AAAB00DC305C /* THPDFKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9950A0FA2029A49300DC305C /* THPDFKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | 9950A1162029B2A600DC305C /* book-of-vaadin.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 9950A1152029B2A500DC305C /* book-of-vaadin.pdf */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 9950A0CB2029A41B00DC305C /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 9950A0AE2029A41B00DC305C /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 9950A0B52029A41B00DC305C; 30 | remoteInfo = THPDFKitDemo; 31 | }; 32 | 9950A0D62029A41B00DC305C /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 9950A0AE2029A41B00DC305C /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 9950A0B52029A41B00DC305C; 37 | remoteInfo = THPDFKitDemo; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXCopyFilesBuildPhase section */ 42 | 9950A1132029AAAB00DC305C /* Embed Frameworks */ = { 43 | isa = PBXCopyFilesBuildPhase; 44 | buildActionMask = 2147483647; 45 | dstPath = ""; 46 | dstSubfolderSpec = 10; 47 | files = ( 48 | 9950A1122029AAAB00DC305C /* THPDFKit.framework in Embed Frameworks */, 49 | ); 50 | name = "Embed Frameworks"; 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXCopyFilesBuildPhase section */ 54 | 55 | /* Begin PBXFileReference section */ 56 | 4AACA0E4EC5687124CE659FD /* Pods-THPDFKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-THPDFKitDemo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-THPDFKitDemo/Pods-THPDFKitDemo.debug.xcconfig"; sourceTree = ""; }; 57 | 6533CFA5272A1F0F5B88E390 /* Pods_THPDFKitDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_THPDFKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6A6C3ED9D21357E219F6DCBB /* Pods-THPDFKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-THPDFKitDemo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-THPDFKitDemo/Pods-THPDFKitDemo.release.xcconfig"; sourceTree = ""; }; 59 | 7CB1FF7D80B2439C02B67C58 /* Pods_THPDFKitDemoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_THPDFKitDemoTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 9950A0B62029A41B00DC305C /* THPDFKitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = THPDFKitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 9950A0B92029A41B00DC305C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 62 | 9950A0BE2029A41B00DC305C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63 | 9950A0C02029A41B00DC305C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | 9950A0C32029A41B00DC305C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 65 | 9950A0C52029A41B00DC305C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 9950A0CA2029A41B00DC305C /* THPDFKitDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = THPDFKitDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 9950A0CE2029A41B00DC305C /* THPDFKitDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = THPDFKitDemoTests.swift; sourceTree = ""; }; 68 | 9950A0D02029A41B00DC305C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | 9950A0D52029A41B00DC305C /* THPDFKitDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = THPDFKitDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 9950A0D92029A41B00DC305C /* THPDFKitDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = THPDFKitDemoUITests.swift; sourceTree = ""; }; 71 | 9950A0DB2029A41B00DC305C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 9950A0FA2029A49300DC305C /* THPDFKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = THPDFKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | 9950A10F2029A5FE00DC305C /* PDFSelectionTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PDFSelectionTableViewController.swift; sourceTree = ""; }; 74 | 9950A1152029B2A500DC305C /* book-of-vaadin.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "book-of-vaadin.pdf"; sourceTree = ""; }; 75 | 9F0648292A21297E95DF803F /* Pods-THPDFKitDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-THPDFKitDemoTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-THPDFKitDemoTests/Pods-THPDFKitDemoTests.debug.xcconfig"; sourceTree = ""; }; 76 | FB8CEE6B196097F5032E8F0E /* Pods-THPDFKitDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-THPDFKitDemoTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-THPDFKitDemoTests/Pods-THPDFKitDemoTests.release.xcconfig"; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 9950A0B32029A41B00DC305C /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | 9950A1112029AAAB00DC305C /* THPDFKit.framework in Frameworks */, 85 | 2159BAEB36B4EF91211F5E22 /* Pods_THPDFKitDemo.framework in Frameworks */, 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | 9950A0C72029A41B00DC305C /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | 5D41FC423B7A587D41F493E3 /* Pods_THPDFKitDemoTests.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 9950A0D22029A41B00DC305C /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | /* End PBXFrameworksBuildPhase section */ 105 | 106 | /* Begin PBXGroup section */ 107 | 9950A0AD2029A41B00DC305C = { 108 | isa = PBXGroup; 109 | children = ( 110 | 9950A0B82029A41B00DC305C /* THPDFKitDemo */, 111 | 9950A0CD2029A41B00DC305C /* THPDFKitDemoTests */, 112 | 9950A0D82029A41B00DC305C /* THPDFKitDemoUITests */, 113 | 9950A0B72029A41B00DC305C /* Products */, 114 | 9950A0F82029A49300DC305C /* Frameworks */, 115 | DB48B7C5FE15B4EAA1FFD06D /* Pods */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | 9950A0B72029A41B00DC305C /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 9950A0B62029A41B00DC305C /* THPDFKitDemo.app */, 123 | 9950A0CA2029A41B00DC305C /* THPDFKitDemoTests.xctest */, 124 | 9950A0D52029A41B00DC305C /* THPDFKitDemoUITests.xctest */, 125 | ); 126 | name = Products; 127 | sourceTree = ""; 128 | }; 129 | 9950A0B82029A41B00DC305C /* THPDFKitDemo */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 9950A1172029B2AA00DC305C /* Resources */, 133 | 9950A10F2029A5FE00DC305C /* PDFSelectionTableViewController.swift */, 134 | 9950A0B92029A41B00DC305C /* AppDelegate.swift */, 135 | 9950A0C02029A41B00DC305C /* Assets.xcassets */, 136 | 9950A0C52029A41B00DC305C /* Info.plist */, 137 | 9950A0C22029A41B00DC305C /* LaunchScreen.storyboard */, 138 | 9950A0BD2029A41B00DC305C /* Main.storyboard */, 139 | ); 140 | path = THPDFKitDemo; 141 | sourceTree = ""; 142 | }; 143 | 9950A0CD2029A41B00DC305C /* THPDFKitDemoTests */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 9950A0CE2029A41B00DC305C /* THPDFKitDemoTests.swift */, 147 | 9950A0D02029A41B00DC305C /* Info.plist */, 148 | ); 149 | path = THPDFKitDemoTests; 150 | sourceTree = ""; 151 | }; 152 | 9950A0D82029A41B00DC305C /* THPDFKitDemoUITests */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 9950A0D92029A41B00DC305C /* THPDFKitDemoUITests.swift */, 156 | 9950A0DB2029A41B00DC305C /* Info.plist */, 157 | ); 158 | path = THPDFKitDemoUITests; 159 | sourceTree = ""; 160 | }; 161 | 9950A0F82029A49300DC305C /* Frameworks */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 9950A0FA2029A49300DC305C /* THPDFKit.framework */, 165 | 6533CFA5272A1F0F5B88E390 /* Pods_THPDFKitDemo.framework */, 166 | 7CB1FF7D80B2439C02B67C58 /* Pods_THPDFKitDemoTests.framework */, 167 | ); 168 | name = Frameworks; 169 | sourceTree = ""; 170 | }; 171 | 9950A1172029B2AA00DC305C /* Resources */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 9950A1152029B2A500DC305C /* book-of-vaadin.pdf */, 175 | ); 176 | path = Resources; 177 | sourceTree = ""; 178 | }; 179 | DB48B7C5FE15B4EAA1FFD06D /* Pods */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 4AACA0E4EC5687124CE659FD /* Pods-THPDFKitDemo.debug.xcconfig */, 183 | 6A6C3ED9D21357E219F6DCBB /* Pods-THPDFKitDemo.release.xcconfig */, 184 | 9F0648292A21297E95DF803F /* Pods-THPDFKitDemoTests.debug.xcconfig */, 185 | FB8CEE6B196097F5032E8F0E /* Pods-THPDFKitDemoTests.release.xcconfig */, 186 | ); 187 | name = Pods; 188 | sourceTree = ""; 189 | }; 190 | /* End PBXGroup section */ 191 | 192 | /* Begin PBXNativeTarget section */ 193 | 9950A0B52029A41B00DC305C /* THPDFKitDemo */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 9950A0DE2029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemo" */; 196 | buildPhases = ( 197 | 0A2935AF3068408BA1D48D26 /* [CP] Check Pods Manifest.lock */, 198 | 9950A0B22029A41B00DC305C /* Sources */, 199 | 9950A0B32029A41B00DC305C /* Frameworks */, 200 | 9950A0B42029A41B00DC305C /* Resources */, 201 | 9950A1132029AAAB00DC305C /* Embed Frameworks */, 202 | F3FBA323FCF2AE4279535467 /* [CP] Embed Pods Frameworks */, 203 | B93FDF29542C2CD6E4C2547B /* [CP] Copy Pods Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | ); 209 | name = THPDFKitDemo; 210 | productName = THPDFKitDemo; 211 | productReference = 9950A0B62029A41B00DC305C /* THPDFKitDemo.app */; 212 | productType = "com.apple.product-type.application"; 213 | }; 214 | 9950A0C92029A41B00DC305C /* THPDFKitDemoTests */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = 9950A0E12029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemoTests" */; 217 | buildPhases = ( 218 | 5C892C2DC66976AEACA9AE51 /* [CP] Check Pods Manifest.lock */, 219 | 9950A0C62029A41B00DC305C /* Sources */, 220 | 9950A0C72029A41B00DC305C /* Frameworks */, 221 | 9950A0C82029A41B00DC305C /* Resources */, 222 | AF487642D00F76BA3EF2E9EF /* [CP] Embed Pods Frameworks */, 223 | 4DCF84FFF09629406B84EE0A /* [CP] Copy Pods Resources */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | 9950A0CC2029A41B00DC305C /* PBXTargetDependency */, 229 | ); 230 | name = THPDFKitDemoTests; 231 | productName = THPDFKitDemoTests; 232 | productReference = 9950A0CA2029A41B00DC305C /* THPDFKitDemoTests.xctest */; 233 | productType = "com.apple.product-type.bundle.unit-test"; 234 | }; 235 | 9950A0D42029A41B00DC305C /* THPDFKitDemoUITests */ = { 236 | isa = PBXNativeTarget; 237 | buildConfigurationList = 9950A0E42029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemoUITests" */; 238 | buildPhases = ( 239 | 9950A0D12029A41B00DC305C /* Sources */, 240 | 9950A0D22029A41B00DC305C /* Frameworks */, 241 | 9950A0D32029A41B00DC305C /* Resources */, 242 | ); 243 | buildRules = ( 244 | ); 245 | dependencies = ( 246 | 9950A0D72029A41B00DC305C /* PBXTargetDependency */, 247 | ); 248 | name = THPDFKitDemoUITests; 249 | productName = THPDFKitDemoUITests; 250 | productReference = 9950A0D52029A41B00DC305C /* THPDFKitDemoUITests.xctest */; 251 | productType = "com.apple.product-type.bundle.ui-testing"; 252 | }; 253 | /* End PBXNativeTarget section */ 254 | 255 | /* Begin PBXProject section */ 256 | 9950A0AE2029A41B00DC305C /* Project object */ = { 257 | isa = PBXProject; 258 | attributes = { 259 | LastSwiftUpdateCheck = 0920; 260 | LastUpgradeCheck = 0920; 261 | ORGANIZATIONNAME = 3Bus; 262 | TargetAttributes = { 263 | 9950A0B52029A41B00DC305C = { 264 | CreatedOnToolsVersion = 9.2; 265 | ProvisioningStyle = Automatic; 266 | }; 267 | 9950A0C92029A41B00DC305C = { 268 | CreatedOnToolsVersion = 9.2; 269 | ProvisioningStyle = Automatic; 270 | TestTargetID = 9950A0B52029A41B00DC305C; 271 | }; 272 | 9950A0D42029A41B00DC305C = { 273 | CreatedOnToolsVersion = 9.2; 274 | ProvisioningStyle = Automatic; 275 | TestTargetID = 9950A0B52029A41B00DC305C; 276 | }; 277 | }; 278 | }; 279 | buildConfigurationList = 9950A0B12029A41B00DC305C /* Build configuration list for PBXProject "THPDFKitDemo" */; 280 | compatibilityVersion = "Xcode 8.0"; 281 | developmentRegion = en; 282 | hasScannedForEncodings = 0; 283 | knownRegions = ( 284 | en, 285 | Base, 286 | ); 287 | mainGroup = 9950A0AD2029A41B00DC305C; 288 | productRefGroup = 9950A0B72029A41B00DC305C /* Products */; 289 | projectDirPath = ""; 290 | projectRoot = ""; 291 | targets = ( 292 | 9950A0B52029A41B00DC305C /* THPDFKitDemo */, 293 | 9950A0C92029A41B00DC305C /* THPDFKitDemoTests */, 294 | 9950A0D42029A41B00DC305C /* THPDFKitDemoUITests */, 295 | ); 296 | }; 297 | /* End PBXProject section */ 298 | 299 | /* Begin PBXResourcesBuildPhase section */ 300 | 9950A0B42029A41B00DC305C /* Resources */ = { 301 | isa = PBXResourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | 9950A0C42029A41B00DC305C /* LaunchScreen.storyboard in Resources */, 305 | 9950A0C12029A41B00DC305C /* Assets.xcassets in Resources */, 306 | 9950A0BF2029A41B00DC305C /* Main.storyboard in Resources */, 307 | 9950A1162029B2A600DC305C /* book-of-vaadin.pdf in Resources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | 9950A0C82029A41B00DC305C /* Resources */ = { 312 | isa = PBXResourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | 9950A0D32029A41B00DC305C /* Resources */ = { 319 | isa = PBXResourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | /* End PBXResourcesBuildPhase section */ 326 | 327 | /* Begin PBXShellScriptBuildPhase section */ 328 | 0A2935AF3068408BA1D48D26 /* [CP] Check Pods Manifest.lock */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | ); 333 | inputPaths = ( 334 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 335 | "${PODS_ROOT}/Manifest.lock", 336 | ); 337 | name = "[CP] Check Pods Manifest.lock"; 338 | outputPaths = ( 339 | "$(DERIVED_FILE_DIR)/Pods-THPDFKitDemo-checkManifestLockResult.txt", 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | shellPath = /bin/sh; 343 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 344 | showEnvVarsInLog = 0; 345 | }; 346 | 4DCF84FFF09629406B84EE0A /* [CP] Copy Pods Resources */ = { 347 | isa = PBXShellScriptBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | ); 351 | inputPaths = ( 352 | ); 353 | name = "[CP] Copy Pods Resources"; 354 | outputPaths = ( 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | shellPath = /bin/sh; 358 | shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-THPDFKitDemoTests/Pods-THPDFKitDemoTests-resources.sh\"\n"; 359 | showEnvVarsInLog = 0; 360 | }; 361 | 5C892C2DC66976AEACA9AE51 /* [CP] Check Pods Manifest.lock */ = { 362 | isa = PBXShellScriptBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | ); 366 | inputPaths = ( 367 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 368 | "${PODS_ROOT}/Manifest.lock", 369 | ); 370 | name = "[CP] Check Pods Manifest.lock"; 371 | outputPaths = ( 372 | "$(DERIVED_FILE_DIR)/Pods-THPDFKitDemoTests-checkManifestLockResult.txt", 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | shellPath = /bin/sh; 376 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 377 | showEnvVarsInLog = 0; 378 | }; 379 | AF487642D00F76BA3EF2E9EF /* [CP] Embed Pods Frameworks */ = { 380 | isa = PBXShellScriptBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | ); 384 | inputPaths = ( 385 | ); 386 | name = "[CP] Embed Pods Frameworks"; 387 | outputPaths = ( 388 | ); 389 | runOnlyForDeploymentPostprocessing = 0; 390 | shellPath = /bin/sh; 391 | shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-THPDFKitDemoTests/Pods-THPDFKitDemoTests-frameworks.sh\"\n"; 392 | showEnvVarsInLog = 0; 393 | }; 394 | B93FDF29542C2CD6E4C2547B /* [CP] Copy Pods Resources */ = { 395 | isa = PBXShellScriptBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | ); 399 | inputPaths = ( 400 | ); 401 | name = "[CP] Copy Pods Resources"; 402 | outputPaths = ( 403 | ); 404 | runOnlyForDeploymentPostprocessing = 0; 405 | shellPath = /bin/sh; 406 | shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-THPDFKitDemo/Pods-THPDFKitDemo-resources.sh\"\n"; 407 | showEnvVarsInLog = 0; 408 | }; 409 | F3FBA323FCF2AE4279535467 /* [CP] Embed Pods Frameworks */ = { 410 | isa = PBXShellScriptBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | ); 414 | inputPaths = ( 415 | "${SRCROOT}/../Pods/Target Support Files/Pods-THPDFKitDemo/Pods-THPDFKitDemo-frameworks.sh", 416 | "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", 417 | ); 418 | name = "[CP] Embed Pods Frameworks"; 419 | outputPaths = ( 420 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", 421 | ); 422 | runOnlyForDeploymentPostprocessing = 0; 423 | shellPath = /bin/sh; 424 | shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-THPDFKitDemo/Pods-THPDFKitDemo-frameworks.sh\"\n"; 425 | showEnvVarsInLog = 0; 426 | }; 427 | /* End PBXShellScriptBuildPhase section */ 428 | 429 | /* Begin PBXSourcesBuildPhase section */ 430 | 9950A0B22029A41B00DC305C /* Sources */ = { 431 | isa = PBXSourcesBuildPhase; 432 | buildActionMask = 2147483647; 433 | files = ( 434 | 9950A0BA2029A41B00DC305C /* AppDelegate.swift in Sources */, 435 | 9950A1102029A5FE00DC305C /* PDFSelectionTableViewController.swift in Sources */, 436 | ); 437 | runOnlyForDeploymentPostprocessing = 0; 438 | }; 439 | 9950A0C62029A41B00DC305C /* Sources */ = { 440 | isa = PBXSourcesBuildPhase; 441 | buildActionMask = 2147483647; 442 | files = ( 443 | 9950A0CF2029A41B00DC305C /* THPDFKitDemoTests.swift in Sources */, 444 | ); 445 | runOnlyForDeploymentPostprocessing = 0; 446 | }; 447 | 9950A0D12029A41B00DC305C /* Sources */ = { 448 | isa = PBXSourcesBuildPhase; 449 | buildActionMask = 2147483647; 450 | files = ( 451 | 9950A0DA2029A41B00DC305C /* THPDFKitDemoUITests.swift in Sources */, 452 | ); 453 | runOnlyForDeploymentPostprocessing = 0; 454 | }; 455 | /* End PBXSourcesBuildPhase section */ 456 | 457 | /* Begin PBXTargetDependency section */ 458 | 9950A0CC2029A41B00DC305C /* PBXTargetDependency */ = { 459 | isa = PBXTargetDependency; 460 | target = 9950A0B52029A41B00DC305C /* THPDFKitDemo */; 461 | targetProxy = 9950A0CB2029A41B00DC305C /* PBXContainerItemProxy */; 462 | }; 463 | 9950A0D72029A41B00DC305C /* PBXTargetDependency */ = { 464 | isa = PBXTargetDependency; 465 | target = 9950A0B52029A41B00DC305C /* THPDFKitDemo */; 466 | targetProxy = 9950A0D62029A41B00DC305C /* PBXContainerItemProxy */; 467 | }; 468 | /* End PBXTargetDependency section */ 469 | 470 | /* Begin PBXVariantGroup section */ 471 | 9950A0BD2029A41B00DC305C /* Main.storyboard */ = { 472 | isa = PBXVariantGroup; 473 | children = ( 474 | 9950A0BE2029A41B00DC305C /* Base */, 475 | ); 476 | name = Main.storyboard; 477 | sourceTree = ""; 478 | }; 479 | 9950A0C22029A41B00DC305C /* LaunchScreen.storyboard */ = { 480 | isa = PBXVariantGroup; 481 | children = ( 482 | 9950A0C32029A41B00DC305C /* Base */, 483 | ); 484 | name = LaunchScreen.storyboard; 485 | sourceTree = ""; 486 | }; 487 | /* End PBXVariantGroup section */ 488 | 489 | /* Begin XCBuildConfiguration section */ 490 | 9950A0DC2029A41B00DC305C /* Debug */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | ALWAYS_SEARCH_USER_PATHS = NO; 494 | CLANG_ANALYZER_NONNULL = YES; 495 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 496 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 497 | CLANG_CXX_LIBRARY = "libc++"; 498 | CLANG_ENABLE_MODULES = YES; 499 | CLANG_ENABLE_OBJC_ARC = YES; 500 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 501 | CLANG_WARN_BOOL_CONVERSION = YES; 502 | CLANG_WARN_COMMA = YES; 503 | CLANG_WARN_CONSTANT_CONVERSION = YES; 504 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 505 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 506 | CLANG_WARN_EMPTY_BODY = YES; 507 | CLANG_WARN_ENUM_CONVERSION = YES; 508 | CLANG_WARN_INFINITE_RECURSION = YES; 509 | CLANG_WARN_INT_CONVERSION = YES; 510 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 511 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 512 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 513 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 514 | CLANG_WARN_STRICT_PROTOTYPES = YES; 515 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 516 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 517 | CLANG_WARN_UNREACHABLE_CODE = YES; 518 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 519 | CODE_SIGN_IDENTITY = "iPhone Developer"; 520 | COPY_PHASE_STRIP = NO; 521 | DEBUG_INFORMATION_FORMAT = dwarf; 522 | ENABLE_STRICT_OBJC_MSGSEND = YES; 523 | ENABLE_TESTABILITY = YES; 524 | GCC_C_LANGUAGE_STANDARD = gnu11; 525 | GCC_DYNAMIC_NO_PIC = NO; 526 | GCC_NO_COMMON_BLOCKS = YES; 527 | GCC_OPTIMIZATION_LEVEL = 0; 528 | GCC_PREPROCESSOR_DEFINITIONS = ( 529 | "DEBUG=1", 530 | "$(inherited)", 531 | ); 532 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 533 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 534 | GCC_WARN_UNDECLARED_SELECTOR = YES; 535 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 536 | GCC_WARN_UNUSED_FUNCTION = YES; 537 | GCC_WARN_UNUSED_VARIABLE = YES; 538 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 539 | MTL_ENABLE_DEBUG_INFO = YES; 540 | ONLY_ACTIVE_ARCH = YES; 541 | SDKROOT = iphoneos; 542 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 543 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 544 | }; 545 | name = Debug; 546 | }; 547 | 9950A0DD2029A41B00DC305C /* Release */ = { 548 | isa = XCBuildConfiguration; 549 | buildSettings = { 550 | ALWAYS_SEARCH_USER_PATHS = NO; 551 | CLANG_ANALYZER_NONNULL = YES; 552 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 553 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 554 | CLANG_CXX_LIBRARY = "libc++"; 555 | CLANG_ENABLE_MODULES = YES; 556 | CLANG_ENABLE_OBJC_ARC = YES; 557 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 558 | CLANG_WARN_BOOL_CONVERSION = YES; 559 | CLANG_WARN_COMMA = YES; 560 | CLANG_WARN_CONSTANT_CONVERSION = YES; 561 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 562 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 563 | CLANG_WARN_EMPTY_BODY = YES; 564 | CLANG_WARN_ENUM_CONVERSION = YES; 565 | CLANG_WARN_INFINITE_RECURSION = YES; 566 | CLANG_WARN_INT_CONVERSION = YES; 567 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 568 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 569 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 570 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 571 | CLANG_WARN_STRICT_PROTOTYPES = YES; 572 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 573 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 574 | CLANG_WARN_UNREACHABLE_CODE = YES; 575 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 576 | CODE_SIGN_IDENTITY = "iPhone Developer"; 577 | COPY_PHASE_STRIP = NO; 578 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 579 | ENABLE_NS_ASSERTIONS = NO; 580 | ENABLE_STRICT_OBJC_MSGSEND = YES; 581 | GCC_C_LANGUAGE_STANDARD = gnu11; 582 | GCC_NO_COMMON_BLOCKS = YES; 583 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 584 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 585 | GCC_WARN_UNDECLARED_SELECTOR = YES; 586 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 587 | GCC_WARN_UNUSED_FUNCTION = YES; 588 | GCC_WARN_UNUSED_VARIABLE = YES; 589 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 590 | MTL_ENABLE_DEBUG_INFO = NO; 591 | SDKROOT = iphoneos; 592 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 593 | VALIDATE_PRODUCT = YES; 594 | }; 595 | name = Release; 596 | }; 597 | 9950A0DF2029A41B00DC305C /* Debug */ = { 598 | isa = XCBuildConfiguration; 599 | baseConfigurationReference = 4AACA0E4EC5687124CE659FD /* Pods-THPDFKitDemo.debug.xcconfig */; 600 | buildSettings = { 601 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 602 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 603 | CODE_SIGN_STYLE = Automatic; 604 | DEVELOPMENT_TEAM = QWP2E983M5; 605 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 606 | HEADER_SEARCH_PATHS = "$(inherited)"; 607 | INFOPLIST_FILE = THPDFKitDemo/Info.plist; 608 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 609 | OTHER_LDFLAGS = "$(inherited)"; 610 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemo; 611 | PRODUCT_NAME = "$(TARGET_NAME)"; 612 | PROVISIONING_PROFILE_SPECIFIER = ""; 613 | SWIFT_VERSION = 4.0; 614 | TARGETED_DEVICE_FAMILY = "1,2"; 615 | }; 616 | name = Debug; 617 | }; 618 | 9950A0E02029A41B00DC305C /* Release */ = { 619 | isa = XCBuildConfiguration; 620 | baseConfigurationReference = 6A6C3ED9D21357E219F6DCBB /* Pods-THPDFKitDemo.release.xcconfig */; 621 | buildSettings = { 622 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 623 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 624 | CODE_SIGN_STYLE = Automatic; 625 | DEVELOPMENT_TEAM = QWP2E983M5; 626 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 627 | HEADER_SEARCH_PATHS = "$(inherited)"; 628 | INFOPLIST_FILE = THPDFKitDemo/Info.plist; 629 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 630 | OTHER_LDFLAGS = "$(inherited)"; 631 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemo; 632 | PRODUCT_NAME = "$(TARGET_NAME)"; 633 | PROVISIONING_PROFILE_SPECIFIER = ""; 634 | SWIFT_VERSION = 4.0; 635 | TARGETED_DEVICE_FAMILY = "1,2"; 636 | }; 637 | name = Release; 638 | }; 639 | 9950A0E22029A41B00DC305C /* Debug */ = { 640 | isa = XCBuildConfiguration; 641 | baseConfigurationReference = 9F0648292A21297E95DF803F /* Pods-THPDFKitDemoTests.debug.xcconfig */; 642 | buildSettings = { 643 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 644 | BUNDLE_LOADER = "$(TEST_HOST)"; 645 | CODE_SIGN_STYLE = Automatic; 646 | DEVELOPMENT_TEAM = QWP2E983M5; 647 | INFOPLIST_FILE = THPDFKitDemoTests/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 649 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemoTests; 650 | PRODUCT_NAME = "$(TARGET_NAME)"; 651 | SWIFT_VERSION = 4.0; 652 | TARGETED_DEVICE_FAMILY = "1,2"; 653 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/THPDFKitDemo.app/THPDFKitDemo"; 654 | }; 655 | name = Debug; 656 | }; 657 | 9950A0E32029A41B00DC305C /* Release */ = { 658 | isa = XCBuildConfiguration; 659 | baseConfigurationReference = FB8CEE6B196097F5032E8F0E /* Pods-THPDFKitDemoTests.release.xcconfig */; 660 | buildSettings = { 661 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 662 | BUNDLE_LOADER = "$(TEST_HOST)"; 663 | CODE_SIGN_STYLE = Automatic; 664 | DEVELOPMENT_TEAM = QWP2E983M5; 665 | INFOPLIST_FILE = THPDFKitDemoTests/Info.plist; 666 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 667 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemoTests; 668 | PRODUCT_NAME = "$(TARGET_NAME)"; 669 | SWIFT_VERSION = 4.0; 670 | TARGETED_DEVICE_FAMILY = "1,2"; 671 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/THPDFKitDemo.app/THPDFKitDemo"; 672 | }; 673 | name = Release; 674 | }; 675 | 9950A0E52029A41B00DC305C /* Debug */ = { 676 | isa = XCBuildConfiguration; 677 | buildSettings = { 678 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 679 | CODE_SIGN_STYLE = Automatic; 680 | DEVELOPMENT_TEAM = QWP2E983M5; 681 | INFOPLIST_FILE = THPDFKitDemoUITests/Info.plist; 682 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 683 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemoUITests; 684 | PRODUCT_NAME = "$(TARGET_NAME)"; 685 | SWIFT_VERSION = 4.0; 686 | TARGETED_DEVICE_FAMILY = "1,2"; 687 | TEST_TARGET_NAME = THPDFKitDemo; 688 | }; 689 | name = Debug; 690 | }; 691 | 9950A0E62029A41B00DC305C /* Release */ = { 692 | isa = XCBuildConfiguration; 693 | buildSettings = { 694 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 695 | CODE_SIGN_STYLE = Automatic; 696 | DEVELOPMENT_TEAM = QWP2E983M5; 697 | INFOPLIST_FILE = THPDFKitDemoUITests/Info.plist; 698 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 699 | PRODUCT_BUNDLE_IDENTIFIER = it.3bus.THPDFKitDemoUITests; 700 | PRODUCT_NAME = "$(TARGET_NAME)"; 701 | SWIFT_VERSION = 4.0; 702 | TARGETED_DEVICE_FAMILY = "1,2"; 703 | TEST_TARGET_NAME = THPDFKitDemo; 704 | }; 705 | name = Release; 706 | }; 707 | /* End XCBuildConfiguration section */ 708 | 709 | /* Begin XCConfigurationList section */ 710 | 9950A0B12029A41B00DC305C /* Build configuration list for PBXProject "THPDFKitDemo" */ = { 711 | isa = XCConfigurationList; 712 | buildConfigurations = ( 713 | 9950A0DC2029A41B00DC305C /* Debug */, 714 | 9950A0DD2029A41B00DC305C /* Release */, 715 | ); 716 | defaultConfigurationIsVisible = 0; 717 | defaultConfigurationName = Release; 718 | }; 719 | 9950A0DE2029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemo" */ = { 720 | isa = XCConfigurationList; 721 | buildConfigurations = ( 722 | 9950A0DF2029A41B00DC305C /* Debug */, 723 | 9950A0E02029A41B00DC305C /* Release */, 724 | ); 725 | defaultConfigurationIsVisible = 0; 726 | defaultConfigurationName = Release; 727 | }; 728 | 9950A0E12029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemoTests" */ = { 729 | isa = XCConfigurationList; 730 | buildConfigurations = ( 731 | 9950A0E22029A41B00DC305C /* Debug */, 732 | 9950A0E32029A41B00DC305C /* Release */, 733 | ); 734 | defaultConfigurationIsVisible = 0; 735 | defaultConfigurationName = Release; 736 | }; 737 | 9950A0E42029A41B00DC305C /* Build configuration list for PBXNativeTarget "THPDFKitDemoUITests" */ = { 738 | isa = XCConfigurationList; 739 | buildConfigurations = ( 740 | 9950A0E52029A41B00DC305C /* Debug */, 741 | 9950A0E62029A41B00DC305C /* Release */, 742 | ); 743 | defaultConfigurationIsVisible = 0; 744 | defaultConfigurationName = Release; 745 | }; 746 | /* End XCConfigurationList section */ 747 | }; 748 | rootObject = 9950A0AE2029A41B00DC305C /* Project object */; 749 | } 750 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo.xcodeproj/xcshareddata/xcschemes/THPDFKitDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 35 | 41 | 42 | 43 | 45 | 51 | 52 | 53 | 54 | 55 | 61 | 62 | 63 | 64 | 65 | 66 | 77 | 79 | 85 | 86 | 87 | 88 | 89 | 90 | 96 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // THPDFKitDemo 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CocoaLumberjack 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | DDLog.add(DDTTYLogger.sharedInstance) // TTY = Xcode console 20 | DDLog.add(DDASLLogger.sharedInstance) // ASL = Apple System Logs 21 | 22 | return true 23 | } 24 | 25 | func applicationWillResignActive(_ application: UIApplication) { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 28 | } 29 | 30 | func applicationDidEnterBackground(_ application: UIApplication) { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | func applicationWillEnterForeground(_ application: UIApplication) { 36 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 37 | } 38 | 39 | func applicationDidBecomeActive(_ application: UIApplication) { 40 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 41 | } 42 | 43 | func applicationWillTerminate(_ application: UIApplication) { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-121.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-20.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-41.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-59.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-42.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-81.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-152.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-167.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "Icon-1024.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-120.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-121.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-152.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-167.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-180.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-41.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-42.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-58.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-59.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-60.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-80.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-81.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-81.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Assets.xcassets/AppIcon.appiconset/Icon-87.png -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/PDFSelectionTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PDFSelectionTableViewController.swift 3 | // THPDFKitDemo 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import THPDFKit 11 | import CocoaLumberjack 12 | 13 | class PDFSelectionTableViewController: UITableViewController { 14 | 15 | let samplePDFs: [URL?] = [Bundle.main.url(forResource: "book-of-vaadin", withExtension: "pdf")] 16 | private static let ddLogLevel = DDLogLevel.verbose 17 | 18 | override func viewDidLoad() { 19 | defaultDebugLevel = PDFSelectionTableViewController.ddLogLevel 20 | super.viewDidLoad() 21 | } 22 | 23 | override func didReceiveMemoryWarning() { 24 | super.didReceiveMemoryWarning() 25 | // Dispose of any resources that can be recreated. 26 | } 27 | 28 | // MARK: - Table view data source 29 | 30 | override func numberOfSections(in tableView: UITableView) -> Int { 31 | return 1 32 | } 33 | 34 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 35 | return samplePDFs.count 36 | } 37 | 38 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 39 | let cell = tableView.dequeueReusableCell(withIdentifier: "samplePDF", for: indexPath) 40 | 41 | cell.textLabel?.text = samplePDFs[indexPath.row]?.lastPathComponent 42 | cell.detailTextLabel?.text = samplePDFs[indexPath.row]?.absoluteString 43 | 44 | return cell 45 | } 46 | 47 | // MARK: - Navigation 48 | 49 | // In a storyboard-based application, you will often want to do a little preparation before navigation 50 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 51 | if let indexPath = tableView.indexPathForSelectedRow{ 52 | let selectedRow = indexPath.row 53 | DDLogDebug("Showing \(String(describing: self.samplePDFs[selectedRow]))") 54 | let detailVC = segue.destination as! PDFViewControllerWrapper 55 | detailVC.url = self.samplePDFs[selectedRow] 56 | 57 | } 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemo/Resources/book-of-vaadin.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hons82/THPDFKit/07880e3f37d25dac1f93d0e351363fd2e27fc898/THPDFKitDemo/THPDFKitDemo/Resources/book-of-vaadin.pdf -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemoTests/THPDFKitDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // THPDFKitDemoTests.swift 3 | // THPDFKitDemoTests 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import THPDFKitDemo 11 | 12 | class THPDFKitDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /THPDFKitDemo/THPDFKitDemoUITests/THPDFKitDemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // THPDFKitDemoUITests.swift 3 | // THPDFKitDemoUITests 4 | // 5 | // Created by Hannes Tribus on 06/02/2018. 6 | // Copyright © 2018 3Bus. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class THPDFKitDemoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------