【发布时间】:2020-08-15 08:42:44
【问题描述】:
我正在尝试快速绕过整个应用程序窗口的角落,例如现金应用程序或篝火。我该怎么做?
【问题讨论】:
标签: ios swift xcode uikit calayer
我正在尝试快速绕过整个应用程序窗口的角落,例如现金应用程序或篝火。我该怎么做?
【问题讨论】:
标签: ios swift xcode uikit calayer
你可以在你的 AppDelegate 类中做到这一点
func applicationDidBecomeActive(_ application: UIApplication) {
window?.layer.cornerRadius = 10
window?.clipsToBounds = true
window?.backgroundColor = .white
}
如果你使用的是 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.
}
【讨论】: