|
@@ -271,8 +271,7 @@ class KMNAlertTipViewController: KMNBaseViewController {
|
|
|
}
|
|
|
|
|
|
public func reloadOCRAlertUI() {
|
|
|
- if isShowOCRAlert == true {
|
|
|
- OCRComponentAlert.isHidden = false
|
|
|
+ if isShowOCRAlert == true && self.listView?.toolMode == .CEditPDFToolMode {
|
|
|
var isContainsImagePage = false
|
|
|
for i in 0..<(listView?.document?.pageCount ?? 0) {
|
|
|
guard i < listView?.document?.pageCount ?? 0 else { continue }
|
|
@@ -291,16 +290,14 @@ class KMNAlertTipViewController: KMNBaseViewController {
|
|
|
}
|
|
|
OCRComponentAlert.reloadData()
|
|
|
} else {
|
|
|
-// if OCRComponentAlert.superview != nil {
|
|
|
-// OCRComponentAlert.removeFromSuperview()
|
|
|
-// }
|
|
|
- OCRComponentAlert.isHidden = true
|
|
|
+ if OCRComponentAlert.superview != nil {
|
|
|
+ OCRComponentAlert.removeFromSuperview()
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
-// if OCRComponentAlert.superview != nil {
|
|
|
-// OCRComponentAlert.removeFromSuperview()
|
|
|
-// }
|
|
|
-// OCRComponentAlert.isHidden = true
|
|
|
+ if OCRComponentAlert.superview != nil {
|
|
|
+ OCRComponentAlert.removeFromSuperview()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -336,7 +333,7 @@ class KMNAlertTipViewController: KMNBaseViewController {
|
|
|
alertHeight += 32.0
|
|
|
}
|
|
|
|
|
|
- if OCRComponentAlert.superview != nil && OCRComponentAlert.isHidden == false {
|
|
|
+ if OCRComponentAlert.superview != nil {
|
|
|
if alertHeight > 0 {
|
|
|
alertHeight += 1
|
|
|
}
|