Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Feature/epub title in navbar (#281)
Browse files Browse the repository at this point in the history
* Update realm to 3.0.2

Updating realm to version 3.0.2, All features seem to be working fine. I have also removed the forced versioning for realm. Any realm updates from from now on should automatically be applied upon using pod install or pod update. All future updates should also be compatible by nature so it should not have to be locked down again.
#278

* Added epub titles to navbar

Added configuration variable to allow dev to display or hide current epub file's title in the navbar.
Added config variable to example project.
  • Loading branch information
noxsicarius authored and hebertialmeida committed Nov 16, 2017
1 parent 1c307ec commit d368aff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ViewController: UIViewController {
// See more at FolioReaderConfig.swift
// config.canChangeScrollDirection = false
// config.enableTTS = false
// config.displayTitle = true
// config.allowSharing = false
// config.tintColor = UIColor.blueColor()
// config.toolBarTintColor = UIColor.redColor()
Expand Down
4 changes: 4 additions & 0 deletions Source/FolioReaderCenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ open class FolioReaderCenter: UIViewController, UICollectionViewDelegate, UIColl

rightBarIcons.append(contentsOf: [font])
navigationItem.rightBarButtonItems = rightBarIcons

if(self.readerConfig.displayTitle){
navigationItem.title = book.title()
}
}

func reloadData() {
Expand Down
3 changes: 3 additions & 0 deletions Source/FolioReaderConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ open class FolioReaderConfig: NSObject {

/// Enable TTS (Text To Speech)
open var enableTTS = true

/// Display book title in navbar
open var displayTitle = false

// hide the page indicator
open var hidePageIndicator = false
Expand Down

0 comments on commit d368aff

Please sign in to comment.