 
     func animateCategoriesList(navBarVisible: Bool) {
         animate {
+            let categoryCardListTop: CGFloat
             if navBarVisible {
-                self.categoryCardList.frame.origin.y = self.navigationBar.frame.height
+                categoryCardListTop = self.navigationBar.frame.height
+            }
+            else if AppSetup.shared.isIphoneX {
+                categoryCardListTop = AppSetup.shared.statusBarHeight
             }
             else {
-                self.categoryCardList.frame.origin.y = 0
+                categoryCardListTop = 0
+            }
+
+            self.categoryCardTopConstraint.update(offset: categoryCardListTop)
+            self.categoryCardList.frame.origin.y = categoryCardListTop
+
+            if AppSetup.shared.isIphoneX {
+                let iPhoneBlackBarTop = self.categoryCardList.frame.minY - self.iPhoneBlackBar.frame.height
+                self.iPhoneBlackBarTopConstraint.update(offset: iPhoneBlackBarTop)
+                self.iPhoneBlackBar.frame.origin.y = iPhoneBlackBarTop
+                self.iPhoneBlackBar.alpha = navBarVisible ? 0 : 1
             }
         }
     }


    override func style() {
        super.style()
        backButton.setImages(.angleBracket, degree: 180)
        shareButton.alpha = 0
        shareButton.setImage(.share, imageStyle: .normal, for: .normal)

            arrangeHomeScreenNavBar(type: .discover, navigationBar: navigationBar)
        }

        if AppSetup.shared.isIphoneX {
            addSubview(iPhoneBlackBar)
            iPhoneBlackBar.snp.makeConstraints { make in
                iPhoneBlackBarTopConstraint = make.top.equalTo(self).constraint
                make.leading.trailing.equalTo(self)
                make.height.equalTo(AppSetup.shared.statusBarHeight + Size.navigationBarHeight)
            }
            iPhoneBlackBar.alpha = 0
        }
        categoryCardList.isHidden = true

        categoryCardList.snp.makeConstraints { make in
            categoryCardTopConstraint = make.top.equalTo(navigationBar.snp.bottom).constraint
            make.leading.trailing.equalTo(self)
            make.height.equalTo(CategoryCardListView.Size.height)
        }
