How to ignore the safe area when using keyboardLayoutGuide

Viewed 9

I have a full screen list and want to use the new keyboardLayoutGuide constraint, but by default it uses the safe area inset. How can I disable this so my list goes all the way to the bottom of the screen when the keyboard is not shown?

NSLayoutConstraint.activate([
   collectionView.topAnchor.constraint(equalTo: view.topAnchor),
   collectionView.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor),
   collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
   collectionView.trailingAnchor.constraint(equalTo:  view.trailingAnchor)
])

enter image description here

0 Answers
Related