From 8f3a89412c68b9b2fe0e3eb83866e24968ff6c46 Mon Sep 17 00:00:00 2001 From: Christian Tietze Date: Thu, 6 Aug 2020 10:13:43 -0700 Subject: [PATCH] fix cell height in macOS sample projects (#1445) Summary: ## Changes in this pull request The macOS sample project used to cut off descenders of the letters "y" and "g". I adjusted the programmatic cell height to match the Nib, and recenter the components vertically. | Before | After | | ---- | ---- | | ![image](https://user-images.githubusercontent.com/59080/87017842-caeb5480-c1d0-11ea-8c58-5d396ddd6081.png) | ![Screen Shot 2020-07-09 at 10 35 15](https://user-images.githubusercontent.com/59080/87017936-ea827d00-c1d0-11ea-9705-ab26b7e63c64.png) | ### Checklist - [x] All tests pass. Demo project builds and runs. - [x] I added tests, an experiment, or detailed why my change isn't tested. - [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - This doesn't sound newsworthy :) - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1445 Reviewed By: joetam Differential Revision: D22950519 Pulled By: bdotdub fbshipit-source-id: 506df3ab158dae52d7d86695d602cca47bc420c3 --- .../View/UserCollectionViewCell.xib | 16 +++++++++------- .../ViewControllers/UsersViewController.swift | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Examples/Examples-macOS/IGListKitExamples/View/UserCollectionViewCell.xib b/Examples/Examples-macOS/IGListKitExamples/View/UserCollectionViewCell.xib index 562f7487..e93a67f6 100644 --- a/Examples/Examples-macOS/IGListKitExamples/View/UserCollectionViewCell.xib +++ b/Examples/Examples-macOS/IGListKitExamples/View/UserCollectionViewCell.xib @@ -1,8 +1,8 @@ - + - + @@ -22,8 +22,8 @@ - - + + @@ -42,12 +42,13 @@ + - - + + @@ -57,8 +58,9 @@ + - + diff --git a/Examples/Examples-macOS/IGListKitExamples/ViewControllers/UsersViewController.swift b/Examples/Examples-macOS/IGListKitExamples/ViewControllers/UsersViewController.swift index b3efa328..7043e7eb 100644 --- a/Examples/Examples-macOS/IGListKitExamples/ViewControllers/UsersViewController.swift +++ b/Examples/Examples-macOS/IGListKitExamples/ViewControllers/UsersViewController.swift @@ -155,6 +155,6 @@ extension UsersViewController: NSCollectionViewDelegateFlowLayout { func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize { let availableWidth = collectionView.bounds.width - return CGSize(width: availableWidth, height: 44) + return CGSize(width: availableWidth, height: 47) } }