Library collapse behavior

This commit is contained in:
Chris Li 2016-10-15 10:42:38 -04:00
parent de8c036da9
commit 9f68535e21
3 changed files with 10 additions and 4 deletions

View File

@ -32,8 +32,14 @@ class LibrarySplitViewController: UISplitViewController, UISplitViewControllerDe
// MARK: - UISplitViewControllerDelegate
func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController: UIViewController, ontoPrimaryViewController primaryViewController: UIViewController) -> Bool {
guard !isShowingLangFilter else {return false}
return true
let secondaryTopController = (secondaryViewController as? UINavigationController)?.topViewController
if let _ = secondaryTopController as? LanguageFilterController {
return false
} else if (secondaryTopController as? BookDetailController)?.book != nil {
return false
} else {
return true
}
}
var isShowingLangFilter: Bool {

View File

@ -49,7 +49,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.8.1747</string>
<string>1.8.1768</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.1747</string>
<string>1.8.1768</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>