Dark Mode

The SwiftUI-based iOS boilerplate offers comprehensive support for dark and light mode, ensuring a seamless user experience across various system themes. This allows users to personalize their app interface according to their visual preferences.

Features

  • 🌗 Automatic Adaptation: The app seamlessly adjusts between dark and light modes based on the user’s system settings, providing a native feel to theme switching.
  • 🎨 Custom Theme Options: Developers can customize color schemes for both modes using SwiftUI’s ColorScheme environment and predefined color extensions. These allow full flexibility in defining app-specific colors for different UI elements.
  • 📱 Accessibility and Readability: Every UI element, including text and icons, is optimized for readability across both modes, guaranteeing a consistent user experience.
  • 🚀 Smooth Animations: SwiftUI’s rendering engine ensures smooth transitions between dark and light modes, enhancing the overall aesthetic and user interaction.
  • 🔧 User-Defined Preferences: The app provides users with the option to manually toggle between dark and light modes, giving them control over their visual experience.

Screenshots

Dark Mode
Dark Mode

What's Included

Style Variables

The iOS boilerplate uses a custom Color extension to manage theme-specific styles for both light and dark modes. Developers can easily customize colors and styles by using the following predefined color variables:

extension Color {
    // MARK: PRIMARY COLORS
 
    static let primaryLight = Color("PrimaryLightBlue")
    static let primaryDark = Color("PrimaryDarkBlue")
 
    // MARK: SECONDARY COLORS
 
    static let secondaryLight = Color("SecondaryLightSky")
    static let secondaryDark = Color("SecondaryDarkSky")
 
    static let accentLight = Color("AccentLightAqua")
    static let accentDark = Color("AccentDarkAqua")
 
    // MARK: BACKGROUND COLORS
 
    static let backgroundLight = Color("BackgroundLightSea")
    static let backgroundDark = Color("BackgroundDarkSea")
    static let textFieldBackground = Color("CustomTextFieldBackground")
 
    // MARK: TEXT COLORS
 
    static let textLightColor = Color("TextLight")
    static let textDarkColor = Color("TextDark")
 
    // MARK: GRAY COLORS
 
    static let grayLight = Color("GrayLightShade")
    static let grayMedium = Color("GrayMediumShade")
    static let grayDark = Color("GrayDarkShade")
}