Don't use readable content inset for search results
This commit is contained in:
parent
765b5e1a7c
commit
18bc6ce61e
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue