diff --git a/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 000000000..18d981003
--- /dev/null
+++ b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/FolioReaderKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FolioReaderKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 000000000..18d981003
--- /dev/null
+++ b/FolioReaderKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Source/FolioReaderCenter.swift b/Source/FolioReaderCenter.swift
index 919174a04..a50e20225 100644
--- a/Source/FolioReaderCenter.swift
+++ b/Source/FolioReaderCenter.swift
@@ -658,7 +658,7 @@ open class FolioReaderCenter: UIViewController, UICollectionViewDelegate, UIColl
delegate?.pageDidAppear?(currentPage)
delegate?.pageItemChanged?(self.getCurrentPageItemNumber())
-
+
completion?()
}
@@ -847,6 +847,26 @@ open class FolioReaderCenter: UIViewController, UICollectionViewDelegate, UIColl
return webViewPage
}
+
+ public func getCurrentPageProgress() -> Float {
+ guard let page = currentPage, let webView = page.webView else { return 0 }
+
+ let pageSize = self.readerConfig.isDirection(pageHeight, self.pageWidth, pageHeight)
+ let contentSize = page.webView?.scrollView.contentSize.forDirection(withConfiguration: self.readerConfig) ?? 0
+ let totalPages = ((pageSize != 0) ? Int(ceil(contentSize / pageSize)) : 0)
+ let currentPageItem = getCurrentPageItemNumber()
+
+ if totalPages > 0 {
+ var progress = Float((currentPageItem * 100) / totalPages)
+
+ if progress < 0 { progress = 0 }
+ if progress > 100 { progress = 100 }
+
+ return progress
+ }
+
+ return 0
+ }
public func changePageItemToPrevious(_ completion: (() -> Void)? = nil) {
// TODO: It was implemented for horizontal orientation.
diff --git a/Source/FolioReaderPageIndicator.swift b/Source/FolioReaderPageIndicator.swift
index 4ef8581b9..1e244bd96 100644
--- a/Source/FolioReaderPageIndicator.swift
+++ b/Source/FolioReaderPageIndicator.swift
@@ -103,7 +103,7 @@ class FolioReaderPageIndicator: UIView {
} else {
minutesLabel.text = self.readerConfig.localizedReaderLessThanOneMinute+" ยท"
}
-
+
reloadView(updateShadow: false)
}
}