您可以在 AppDelegate 类中执行此操作
func applicationDidBecomeActive(_ application: UIApplication) {
window?.layer.cornerRadius = 10
window?.clipsToBounds = true
window?.backgroundColor = .white
}
Run Code Online (Sandbox Code Playgroud)
如果您使用的是 SceneDelegate 类,那么
func sceneDidBecomeActive(_ scene: UIScene) {
window?.layer.cornerRadius = 110
window?.clipsToBounds = true
window?.backgroundColor = UIColor.black
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
118 次 |
| 最近记录: |