GithubHelp home page GithubHelp logo

folioreader / folioreaderkit Goto Github PK

View Code? Open in Web Editor NEW
2.6K 120.0 755.0 86.44 MB

📚 A Swift ePub reader and parser framework for iOS.

Home Page: https://folioreader.github.io/FolioReaderKit/

License: BSD 3-Clause "New" or "Revised" License

Swift 91.94% Objective-C 0.29% CSS 1.93% JavaScript 5.33% Ruby 0.50%
epub-reader night-mode custom-fonts swift highlight ios epub

folioreaderkit's Introduction

FolioReader logo FolioReaderKit is an ePub reader and parser framework for iOS written in Swift.

Version License

Features

  • ePub 2 and ePub 3 support
  • Custom Fonts
  • Custom Text Size
  • Text Highlighting
  • List / Edit / Delete Highlights
  • Themes / Day mode / Night mode
  • Handle Internal and External Links
  • Portrait / Landscape
  • Reading Time Left / Pages left
  • In-App Dictionary
  • Media Overlays (Sync text rendering with audio playback)
  • TTS - Text to Speech Support
  • Parse epub cover image
  • RTL Support
  • Vertical or/and Horizontal scrolling
  • Share Custom Image Quotes NEW
  • Support multiple instances at same time, like parallel reading NEW
  • Book Search
  • Add Notes to a Highlight

Who is using it?

On AppSight you can see apps that are using it in production.

Demo

Custom Fonts 😏 Text Highlighting 😍
Custom fonts Highlight
Reading Time Left 😮 Media Overlays 😭
Time left Media Overlays

Installation

FolioReaderKit is available through CocoaPods and Carthage.

Cocoapods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate FolioReaderKit into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'FolioReaderKit'
end

Then, run the following command:

$ pod install

Alternatively to give it a test run, run the command:

$ pod try FolioReaderKit

Carthage

Add the following to your Cartfile

github "FolioReader/FolioReaderKit"

Run the following command:

$ carthage update --platform iOS --no-use-binaries

Then, follow the steps as described in Carthage's README.

Requirements

  • iOS 9.0+
  • Xcode 10.1+

Basic Usage

To get started, this is a simple usage sample of using the integrated view controller.

import FolioReaderKit

func open(sender: AnyObject) {
    let config = FolioReaderConfig()
    let bookPath = Bundle.main.path(forResource: "book", ofType: "epub")
    let folioReader = FolioReader()
    folioReader.presentReader(parentViewController: self, withEpubPath: bookPath!, andConfig: config)
}

For more usage examples check the Example folder.

Storyboard

To get started, here is a simple example how to use the integrated view controller with storyboards.

import FolioReaderKit

class StoryboardFolioReaderContrainer: FolioReaderContainer {
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        let config = FolioReaderConfig()
        config.scrollDirection = .horizontalWithVerticalContent
        
        guard let bookPath = Bundle.main.path(forResource: "The Silver Chair", ofType: "epub") else { return }
        setupConfig(config, epubPath: bookPath)
    }
}

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.

Documentation

Checkout Example and API Documentation

You can always use the header-doc. (use alt+click in Xcode)

Migration

If you are migrating to a newer version check out MIGRATION and CHANGELOG.

Author

Heberti Almeida

License

FolioReaderKit is available under the BSD license. See the LICENSE file.

folioreaderkit's People

Contributors

afornes avatar akantsevoi avatar alexpopov avatar camanjj avatar christian2denker avatar emersoncarpes avatar fantim avatar hebertialmeida avatar hkalexling avatar ianyh avatar illwss avatar katopz avatar kjantzer avatar kyonli avatar neowinston avatar ngo275 avatar noxsicarius avatar panajotismaroungas avatar piechart avatar revolter avatar rodrigorsa avatar ryan-w avatar solomiyan avatar strugarualexandra avatar sunho avatar tarigancana avatar tschob avatar vandetho avatar wesleycgs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.