Skip to content

1.0.3

Choose a tag to compare

@nikunj-MindInventory nikunj-MindInventory released this 05 Jul 07:38
· 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 didFinishLaunchingWithOptions function 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
}