UITableView or Uicollectionview are inherited uiscrollview sliding, judging whether it is up or down using the Uiscrollview proxy method
Func scrollviewwillenddragging (_ scrollView: uiscrollview, withvelocity velocity: cgpoint , Targetcontentoffset: unsafemutablepointer<cgpoint>)
func scrollviewwillenddragging (_ Scrollview:uiscrollview, withVelocity Velocity:cgpoint, targetcontentoffset:unsafemutablepointer<cgpoint>) {Let pan = Scrollview.pangesturerecog Nizer Let velocity = pan.velocity (in:scrollview). Y if velocity <-15 {//Slide up Self.navigationcontroller?. Setnavigationbarhidden (True, animated:true)//status bar color is black UIApplication.shared.statusBarStyle =. Defau Lt NotificationCenter.default.post (Name:NSNotification.Name (rawvalue:kupdatetitlefreamnote), Object:nil) } else if velocity > 15 {//Slide Self.navigationcontroller?. Setnavigationbarhidden (False, Animated:true)//status bar color is white UIApplication.shared.statusBarStyle =. Ligh Tcontent NotificationCenter.default.post (Name:NSNotification.Name (Rawvalue:kinupdatetitlefreamnote), object: Nil)}}
Status bar color is black, navigation is hidden, slide navigation bar is displayed, status bar turns white
As for the layout of the control needs to change according to the state,
Slide Hide navigation on IOS, slide show navigation, fish-like navigation effect