Post

Replies

Boosts

Views

Activity

Reply to Alerts and Action Sheets not using SwiftUI accent color
I was having the same problem for last half year, as I thought Apple will fix it before my app publication. However, it didn't happen and I had to find some way to make it working. Appears it's ease to fix with one line of code in SceneDelegate. The solution isn't perfect, as it overwrites all UIAlertController tintColor, but it works. // SceneDelegate.swift func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // ... UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = UIColor(named: "AccentColor") // ... }
Jun ’21