You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to fade the title label along with the background. I found one way of doing it for iOS 13+. I tried simply finding the label view and setting the alpha but as soon as the title updates the label is fully visible again.
if #available(iOS 13.0, *) {
if let color = navigationBar.scrollEdgeAppearance?.titleTextAttributes [NSAttributedString.Key.foregroundColor] as? UIColor {
navigationBar.scrollEdgeAppearance?.titleTextAttributes [NSAttributedString.Key.foregroundColor] = color.withAlphaComponent(alpha)
}
if let color = navigationBar.standardAppearance.titleTextAttributes [NSAttributedString.Key.foregroundColor] as? UIColor {
navigationBar.standardAppearance.titleTextAttributes [NSAttributedString.Key.foregroundColor] = color.withAlphaComponent(alpha)
}
if let color = navigationBar.compactAppearance?.titleTextAttributes [NSAttributedString.Key.foregroundColor] as? UIColor {
navigationBar.compactAppearance?.titleTextAttributes [NSAttributedString.Key.foregroundColor] = color.withAlphaComponent(alpha)
}
}
The text was updated successfully, but these errors were encountered:
I'd like to fade the title label along with the background. I found one way of doing it for iOS 13+. I tried simply finding the label view and setting the alpha but as soon as the title updates the label is fully visible again.
The text was updated successfully, but these errors were encountered: