1.0.3
·
189 commits
to main
since this release
1.0.3
- Added functionality for changing UI module theme.
How to use:
- In your AppDelegate.swift file go to the
didFinishLaunchingWithOptionsfunction and add below code.
func application(_ application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
setThemeAndNavigationAppearance()
return true
}
private func setThemeAndNavigationAppearance() {
PassioThemeManager.shared.setAppTheme(
theme: PassioTheme(
primaryColor: "#FF5600",
secondaryTabColor: "#D1D5DB",
navigationColor: "#f0e6ff",
statusBarColor: "#f0e6ff"
)
)
let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground()
appearance.backgroundColor = .navigationColor
appearance.titleTextAttributes = [.font: UIFont.inter(type: .bold, size: 22),
.foregroundColor: UIColor.gray900]
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
UINavigationBar.appearance().compactAppearance = appearance
}