diff --git a/Kiwix-iOS/Controller/Main/MainDelegates.swift b/Kiwix-iOS/Controller/Main/MainDelegates.swift index 14be85d9..b473a683 100644 --- a/Kiwix-iOS/Controller/Main/MainDelegates.swift +++ b/Kiwix-iOS/Controller/Main/MainDelegates.swift @@ -266,15 +266,15 @@ extension MainController: TableOfContentsDelegate { func configureTOCConstraints() { switch traitCollection.horizontalSizeClass { case .compact: + let toolBarHeight: CGFloat = traitCollection.horizontalSizeClass == .regular ? 0.0 : (traitCollection.verticalSizeClass == .compact ? 32.0 : 44.0) let tocHeight: CGFloat = { guard let controller = tableOfContentsController else {return floor(view.frame.height * 0.4)} let tocContentHeight = controller.tableView.contentSize.height guard controller.headings.count != 0 else {return floor(view.frame.height * 0.4)} - let toolBarHeight: CGFloat = traitCollection.horizontalSizeClass == .regular ? 0.0 : (traitCollection.verticalSizeClass == .compact ? 32.0 : 44.0) - return min(tocContentHeight + toolBarHeight, floor(view.frame.height * 0.65)) + return min(tocContentHeight, floor(view.frame.height * 0.65)) }() tocHeightConstraint.constant = tocHeight - tocTopToSuperViewBottomSpacing.constant = isShowingTableOfContents ? tocHeight : 0.0 + tocTopToSuperViewBottomSpacing.constant = isShowingTableOfContents ? tocHeight + toolBarHeight + 10 : 0.0 case .regular: tocLeadSpacing.constant = isShowingTableOfContents ? 0.0 : 270 default: diff --git a/Kiwix-iOS/Storyboard/Main.storyboard b/Kiwix-iOS/Storyboard/Main.storyboard index 92985fd6..2f759788 100644 --- a/Kiwix-iOS/Storyboard/Main.storyboard +++ b/Kiwix-iOS/Storyboard/Main.storyboard @@ -1,11 +1,12 @@ - + - + + @@ -23,7 +24,7 @@ - + @@ -47,22 +48,22 @@ - + - + - + - + - + - + - + - + @@ -210,14 +206,22 @@ -