Swift 代码片段
1、导航栏背景色和标题颜色
navigationController.navigationBar.barTintColor = .red //背景色 navigationController.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] //标题颜色
self.navigationController?.navigationBar.tintColor = UIColor.white //左右按钮文字颜色
2、App退出到桌面最小化
UIControl().sendAction(#selector(NSXPCConnection.suspend), to: UIApplication.shared, for: nil)