can anyone help me, Cell in iphone X is not showing properly, it show upside in collection view.
but same cell and code working fine in all other devices.
func collectionView(_ collectionView: UICollectionView,layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: NIConstant.SCREEN_WIDTH, height: NIConstant.SCREEN_WIDTH)
}
RESOLVED
the problem resolved by adding the piece of code in viewDidLoad method
if #available(iOS 11.0, *) {
fullScreenCollectionView?.contentInsetAdjustmentBehavior = .always
}