Skip to content

Commit 7f1d01a

Browse files
committed
Create variable hidePageIndicator to hide page indicator.
1 parent 5b76502 commit 7f1d01a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Example/Example/ViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ViewController: UIViewController {
4343
// config.toolBarBackgroundColor = UIColor.purpleColor()
4444
// config.menuTextColor = UIColor.brownColor()
4545
// config.menuBackgroundColor = UIColor.lightGrayColor()
46+
// config.hidePageIndicator = true
4647

4748
// Custom sharing quote background
4849
let customImageQuote = QuoteImage(withImage: UIImage(named: "demo-bg")!, alpha: 0.6, backgroundColor: UIColor.black)

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ DEPENDENCIES:
2828

2929
EXTERNAL SOURCES:
3030
FolioReaderKit:
31-
:path: "../"
31+
:path: ../
3232

3333
SPEC CHECKSUMS:
3434
AEXML: 6fc6433aa35bdc15dd8eb8d54eb7aa4520a010eb
@@ -45,4 +45,4 @@ SPEC CHECKSUMS:
4545

4646
PODFILE CHECKSUM: 591559c46a2b0a49e687795b8ae46fadbddf8fd4
4747

48-
COCOAPODS: 1.1.1
48+
COCOAPODS: 1.2.0.beta.1

Source/FolioReaderConfig.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ open class FolioReaderConfig: NSObject {
149149
/// Enable TTS (Text To Speech)
150150
open var enableTTS = true
151151

152+
// hide the page indicator
153+
open var hidePageIndicator = false
154+
152155
// MARK: Quote image share
153156

154157
/// Custom Quote logo

Source/FolioReaderPageIndicator.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ class FolioReaderPageIndicator: UIView {
8080
pagesLabel.textColor = isNight(UIColor(white: 1, alpha: 0.6), UIColor(white: 0, alpha: 0.9))
8181
}
8282

83-
fileprivate func reloadViewWithPage(_ page: Int) {
83+
fileprivate func reloadViewWithPage(_ page: Int, _ hidePageIndicator:Bool = readerConfig.hidePageIndicator) {
8484
let pagesRemaining = FolioReader.needsRTLChange ? totalPages-(totalPages-page+1) : totalPages-page
8585

86+
pagesLabel.isHidden = hidePageIndicator
87+
minutesLabel.isHidden = hidePageIndicator
88+
8689
if pagesRemaining == 1 {
8790
pagesLabel.text = " "+readerConfig.localizedReaderOnePageLeft
8891
} else {

0 commit comments

Comments
 (0)