Skip to content

Instantly share code, notes, and snippets.

@joemasilotti
Created April 21, 2025 18:33
Show Gist options
  • Save joemasilotti/10e191185397cda1fcf55eea08e5f0b3 to your computer and use it in GitHub Desktop.
Save joemasilotti/10e191185397cda1fcf55eea08e5f0b3 to your computer and use it in GitHub Desktop.
Customize navigation bar on Hotwire Native iOS
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