iOS/Swift - Hide/Show UITabBarController when scrolling down/up

后端 未结 5 495
栀梦
栀梦 2020-12-08 17:36

I\'m quite new to iOS development. Right now i\'m trying to hide my tabbar when I scroll down and when scrolling up the tabbar should appear. I would like to have this anima

5条回答
  •  感情败类
    2020-12-08 18:15

    According to @Ariel Hernández Amador answer for black screen after hiding Tabbar just use this line of code in your ViewDidLoad(). Working Superbly...I have posted this here as I am unable to comment over there.

    viewDidLoad()
    {
    if #available(iOS 11.0, *) {
                self.myScroll.contentInsetAdjustmentBehavior = .never
            }
    }
    

    Here myScroll is the Scrollview I am using in my VC. Just replace it with your VC.

提交回复
热议问题