mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-25 21:05:09 -04:00
fix: toc load on iPad
This commit is contained in:
parent
6dc2ae01c8
commit
49f64ca16f
@ -189,6 +189,11 @@ class MainController: UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
func configureTableOfContents() {
|
||||
guard traitCollection.horizontalSizeClass == .Regular && isShowingTableOfContents else {return}
|
||||
tableOfContentsController?.headings = JSInjection.getTableOfContents(webView)
|
||||
}
|
||||
|
||||
func configureUserActivity() {
|
||||
userActivity = userActivity ?? NSUserActivity(activityType: activityType)
|
||||
guard let title = article?.title, let url = article?.url?.absoluteString else {return}
|
||||
|
@ -50,6 +50,7 @@ extension MainController: UIWebViewDelegate, SFSafariViewControllerDelegate, LPT
|
||||
|
||||
// UI Updates
|
||||
configureNavigationButtonTint()
|
||||
configureTableOfContents()
|
||||
JSInjection.adjustFontSizeIfNeeded(webView)
|
||||
}
|
||||
|
||||
|
@ -115,8 +115,10 @@ extension MainController {
|
||||
dimView.hidden = false
|
||||
dimView.alpha = 0.0
|
||||
view.layoutIfNeeded()
|
||||
tableOfContentsController?.headings = JSInjection.getTableOfContents(webView)
|
||||
|
||||
configureTableOfContents()
|
||||
configureTOCViewConstraints()
|
||||
|
||||
UIView.animateWithDuration(0.3, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0.0, options: .CurveEaseOut, animations: {
|
||||
self.view.layoutIfNeeded()
|
||||
self.dimView.alpha = 0.5
|
||||
|
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1549</string>
|
||||
<string>1.8.1550</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1549</string>
|
||||
<string>1.8.1550</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionMainStoryboard</key>
|
||||
|
Loading…
x
Reference in New Issue
Block a user