added iOS source code
[wl-app.git] / iOS / Pods / FolioReaderKit / README.md
1
2 ![FolioReader logo](https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/folioreader.png)
3 FolioReaderKit is an ePub reader and parser framework for iOS written in Swift.
4
5 ![Version](https://img.shields.io/cocoapods/v/FolioReaderKit.svg)
6 ![Downloads](https://img.shields.io/cocoapods/dt/FolioReaderKit.svg)
7 ![Apps using](https://img.shields.io/cocoapods/at/FolioReaderKit.svg)
8 ![License](https://img.shields.io/cocoapods/l/FolioReaderKit.svg)
9
10 ## Features
11
12 - [x] ePub 2 and ePub 3 support
13 - [x] Custom Fonts
14 - [x] Custom Text Size
15 - [x] Text Highlighting
16 - [x] List / Edit / Delete Highlights
17 - [x] Themes / Day mode / Night mode
18 - [x] Handle Internal and External Links
19 - [x] Portrait / Landscape
20 - [x] Reading Time Left / Pages left
21 - [x] In-App Dictionary
22 - [x] Media Overlays (Sync text rendering with audio playback)
23 - [x] TTS - Text to Speech Support
24 - [x] Parse epub cover image
25 - [x] RTL Support
26 - [x] Vertical or/and Horizontal scrolling
27 - [x] Share Custom Image Quotes **<sup>NEW</sup>**
28 - [x] Support multiple instances at same time, like parallel reading **<sup>NEW</sup>**
29 - [ ] Book Search
30 - [ ] Add Notes to a Highlight
31
32 ## Demo
33
34 **Custom Fonts :smirk:**   |  **Text Highlighting :heart_eyes:**
35 :-------------------------:|:-------------------------:
36 ![Custom fonts](https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/custom-fonts.gif)  |  ![Highlight](https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/highlight.gif)
37
38 **Reading Time Left :open_mouth:**   |  **Media Overlays 😭**
39 :-------------------------:|:-------------------------:
40 ![Time left](https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/time-left.mov.gif)  |  ![Media Overlays](https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/media-overlays.gif)
41
42 ## Installation
43
44 **FolioReaderKit** is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage). 
45
46 ### Cocoapods
47
48 [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
49
50 ```bash
51 $ gem install cocoapods
52 ```
53
54 To integrate FolioReaderKit into your Xcode project using CocoaPods, specify it in your `Podfile`:
55
56 ```ruby
57 source 'https://github.com/CocoaPods/Specs.git'
58 platform :ios, '8.0'
59 use_frameworks!
60
61 target '<Your Target Name>' do
62     pod 'FolioReaderKit'
63 end
64 ```
65
66 Then, run the following command:
67
68 ```bash
69 $ pod install
70 ```
71
72 Alternatively to give it a test run, run the command:
73
74 ```bash
75 $ pod try FolioReaderKit
76 ```
77
78 ### Carthage
79
80 Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile)
81
82 ```ruby
83 github "FolioReader/FolioReaderKit"
84 ```
85
86 Run the following command:
87
88 ```bash
89 $ carthage update --platform iOS --no-use-binaries
90 ```
91
92 Then, follow the steps as described in Carthage's [README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).
93
94 ## Requirements
95
96 - iOS 8.0+
97 - Xcode 8.3+
98
99 ## Basic Usage
100
101 To get started, this is a simple usage sample of using the integrated view controller.
102
103 ```swift
104 import FolioReaderKit
105
106 func open(sender: AnyObject) {
107     let config = FolioReaderConfig()
108     let bookPath = Bundle.main.path(forResource: "book", ofType: "epub")
109     let folioReader = FolioReader()
110     folioReader.presentReader(parentViewController: self, withEpubPath: bookPath!, andConfig: config)
111 }
112 ```
113
114 For more usage examples check the [Example](/Example) folder.
115
116 ## Storyboard
117
118 To get started, here is a simple example how to use the integrated view controller with storyboards.
119
120 ```swift
121 import FolioReaderKit
122
123 class StoryboardFolioReaderContrainer: FolioReaderContainer {
124     required init?(coder aDecoder: NSCoder) {
125         super.init(coder: aDecoder)
126         
127         let config = FolioReaderConfig()
128         config.scrollDirection = .horizontalWithVerticalContent
129         
130         guard let bookPath = Bundle.main.path(forResource: "The Silver Chair", ofType: "epub") else { return }
131         setupConfig(config, epubPath: bookPath)
132     }
133 }
134 ```
135
136 Go to your storyboard file, choose or create the view controller that should present the epub reader. In the identity inspector set StoryboardFolioReaderContrainer as class.
137
138 ## Documentation
139 Checkout [Example](/Example) and [API Documentation](http://cocoadocs.org/docsets/FolioReaderKit)
140
141 You can always use the header-doc. (use **alt+click** in Xcode)
142
143 <img src="https://raw.githubusercontent.com/FolioReader/FolioReaderKit/assets/header-doc.png" width="521px"/>
144
145 ### Migration
146 If you are migrating to a newer version check out [MIGRATION](/MIGRATION.md) and [CHANGELOG](/CHANGELOG.md).
147
148 ## Author
149 [**Heberti Almeida**](https://github.com/hebertialmeida)
150
151 - Follow me on **Twitter**: [**@hebertialmeida**](https://twitter.com/hebertialmeida)
152 - Contact me on **LinkedIn**: [**hebertialmeida**](http://linkedin.com/in/hebertialmeida)
153
154 ## License
155 FolioReaderKit is available under the BSD license. See the [LICENSE](/LICENSE) file.