在UIViewController中 加入以下代码,隐藏屏幕下方的黑线 // 隐藏下面的黑线 API_AVAILABLE(ios(11.0)) (BOOL)prefersHomeIndicatorAutoHidden{ return YES; }