Created
April 21, 2025 18:33
-
-
Save joemasilotti/10e191185397cda1fcf55eea08e5f0b3 to your computer and use it in GitHub Desktop.
Customize navigation bar on Hotwire Native iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
@main | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { | |
let appearance = UINavigationBarAppearance() | |
appearance.configureWithOpaqueBackground() | |
appearance.backgroundColor = .systemGreen | |
/// https://developer.apple.com/documentation/uikit/uinavigationbarappearance | |
UINavigationBar.appearance().scrollEdgeAppearance = appearance | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment