|
@@ -1258,6 +1258,21 @@ extension KMMainViewController {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ func updateNextAndPreViousButtonState() {
|
|
|
|
+ let item : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentNextPageToolbarItemIdentifier))!
|
|
|
|
+ let toItem : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentPreviousPageToolbarItemIdentifier))!
|
|
|
|
+ if self.listView.canGoToNextPage() {
|
|
|
|
+ item.unEnabled = false
|
|
|
|
+ } else {
|
|
|
|
+ item.unEnabled = true
|
|
|
|
+ }
|
|
|
|
+ if self.listView.canGoToPreviousPage() {
|
|
|
|
+ toItem.unEnabled = false
|
|
|
|
+ } else {
|
|
|
|
+ toItem.unEnabled = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
extension KMMainViewController: KMSecondaryViewControllerDelegate {
|
|
extension KMMainViewController: KMSecondaryViewControllerDelegate {
|
|
@@ -1342,10 +1357,12 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
|
|
|
func changePDFViewGotoNextPageAction() {
|
|
func changePDFViewGotoNextPageAction() {
|
|
self.listView.goToNextPage(nil)
|
|
self.listView.goToNextPage(nil)
|
|
|
|
+ self.updateNextAndPreViousButtonState()
|
|
}
|
|
}
|
|
|
|
|
|
func changePDFViewGoToPreviousPageAction() {
|
|
func changePDFViewGoToPreviousPageAction() {
|
|
self.listView.goToPreviousPage(nil)
|
|
self.listView.goToPreviousPage(nil)
|
|
|
|
+ self.updateNextAndPreViousButtonState()
|
|
}
|
|
}
|
|
|
|
|
|
func showPDFViewPrintViewController() {
|
|
func showPDFViewPrintViewController() {
|