Compare commits

...

3 Commits

3 changed files with 11 additions and 3 deletions

View File

@ -80,9 +80,8 @@ class SearchResultsViewController: UIViewController, CollectionViewController {
break break
} }
let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment) let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac { // we don't use the readable content inset here, because it insets the entire cell, rather than just the content
section.contentInsetsReference = .readableContent // so the cell backgrounds not being full width looks weird
}
return section return section
} }
view = UICollectionView(frame: .zero, collectionViewLayout: layout) view = UICollectionView(frame: .zero, collectionViewLayout: layout)

View File

@ -304,6 +304,12 @@ private class SplitSecondaryNavigationController: EnhancedNavigationViewControll
} }
} }
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
super.pushViewController(viewController, animated: animated)
configureSecondarySplitCloseButton(for: viewControllers.first!)
}
private func configureSecondarySplitCloseButton(for viewController: UIViewController) { private func configureSecondarySplitCloseButton(for viewController: UIViewController) {
guard viewController.navigationItem.leftBarButtonItem?.tag != ViewTags.splitNavCloseSecondaryButton else { guard viewController.navigationItem.leftBarButtonItem?.tag != ViewTags.splitNavCloseSecondaryButton else {
return return

View File

@ -48,6 +48,9 @@ class TrendHistoryView: UIView {
} }
let maxUses = history.max(by: { $0.uses < $1.uses })!.uses let maxUses = history.max(by: { $0.uses < $1.uses })!.uses
guard maxUses > 0 else {
return
}
// remove old layers if this view is being re-used // remove old layers if this view is being re-used
layer.sublayers?.forEach { $0.removeFromSuperlayer() } layer.sublayers?.forEach { $0.removeFromSuperlayer() }